Question Detail: A binary indexed tree has very less or relatively no literature as compared to other data structures. The only place where it is taught is the topcoder tutorial. Although the tutorial is complete in all the explanations, I cannot Read More …
Blog
How can I explain to my parents that I study programming languages?
Question Detail: I am currently finishing my MSc in computer science. I am interested in programming languages, especially in type systems. I got interested in research in this field and next semester I will start a PhD on the subject. Now Read More …
What are system clock and CPU clock; and what are their functions?
Question Detail: While reading a book, I came across a paragraph given below: In order to synchronize all of a computer’s operations, a system clock—a small quartz crystal located on the motherboard—is used. The system clock sends out a signal on Read More …
How can I reduce Subset Sum to Partition?
Question Detail: Maybe this is quite simple but I have some trouble to get this reduction. I want to reduce Subset Sum to Partition but at this time I don’t see the relation! Is it possible to reduce this problem using Read More …
The math behind converting from any base to any base without going through base 10?
Question Detail: I’ve been looking into the math behind converting from any base to any base. This is more about confirming my results than anything. I found what seems to be my answer on mathforum.org but I’m still not sure if Read More …
How to show that a “reversed” regular language is regular
Question Detail: I’m stuck on the following question: “Regular languages are precisely those accepted by finite automata. Given this fact, show that if the language $L$ is accepted by some finite automaton, then $L^{R}$ is also accepted by some finite; $L^{R}$ Read More …
What is tail recursion?
Question Detail: I know the general concept of recursion. I came across the concept of tail recursion while studying the quicksort algorithm. In this video of quick sort algorithm from MIT at 18:30 seconds the professor says that this is a Read More …
Longest path in an undirected tree with only one traversal
Question Detail: There is this standard algorithm for finding longest path in undirected trees using two depth-first searches: Start DFS from a random vertex $v$ and find the farthest vertex from it; say it is $v’$. Now start a DFS from Read More …
Why do we need assembly language?
Question Detail: We mostly write programme in high level language. So while studying I came across assembly language. So an assembler converts assembly language to machine language and a compiler does the same with high level language. I found assembly language Read More …
Factorial algorithm more efficient than naive multiplication
Question Detail: I know how to code for factorials using both iterative and recursive (e.g. n * factorial(n-1) for e.g.). I read in a textbook (without been given any further explanations) that there is an even more efficient way of coding Read More …