Top "Theory" questions

Programming-language-agnostic Questions that focus on the theoretical aspects rather than the actual implementations.

Balancing a Binary Tree (AVL)

Ok, this is another one in the theory realm for the CS guys around. In the 90's I did fairly …

algorithm computer-science binary-tree theory avl-tree
Calling base class overridden function from base class method

public class A { public void f1(String str) { System.out.println("A.f1(String)"); this.f1(1, str); } public void f1(…

java oop theory overloading
What is the Pumping Lemma in Layman's terms?

I saw this question, and was curious as to what the pumping lemma was (Wikipedia didn't help much). I understand …

theory proof pumping-lemma
? operator without else-part

I use C# ? operator when I have if-statements that affects one row and it's all good. But lets say I …

c# theory conditional-operator
Which is the fastest way to get the absolute value of a number

Which is the fastest way to implement an operation that returns the absolute value of a number? x=root(x²) …

algorithm performance theory absolute-value
Smoothing values over time: moving average or something better?

I'm coding something at the moment where I'm taking a bunch of values over time from a hardware compass. This …

algorithm theory moving-average
Why are Redirect Results not allowed in Child Actions in Asp.net MVC 2

I have some partial actions that I render with the Asp.Net Futures RenderAction method. Some of these perform redirects …

asp.net-mvc asp.net-mvc-2 theory
How to determine whether a language is LL(1) LR(0) SLR(1)

Is there a simple way to determine whether a grammar is LL(1), LR(0), SLR(1)... just from looking on the grammar …

parsing compiler-construction theory grammar bnf
What's a Turing machine?

What is a Turing machine and why do people keep mentioning it? My IBM PC is all I need to …

computer-science theory turing-machines computability
What is a scalar Object in C++?

As far as I understand it fundamental types are Scalar and Arrays are aggregate but what about user defined types? …

c++ types theory