Tag: c++
Design and Implement a LRU (Least Recently Used) Cache that supports two operations i.e. get and set. get(key) – This method will retrieve the value (non-negative) of the key if …
November 5, 2013
32 bit, algorithms, assembly language, c / c++, code, implementation, interpreter / compiler, optimization, programming languages, windows
Introduction You probably came across the term ‘Tail Recursion’ or ‘Tail Recursive’ before. You even have written a piece of Tail Recursive functions/algorithms without knowing it. So, what is …
Question: Implement integer square root for int sqrt(int x) There are many ways to compute the integer square root. But if you don’t bother, you can always cheat the compilers …
Question : Given a sorted list represented by a directional link structure (as follows), remove the duplicates and return the new list. /** * Definition for singly-linked list. * …
Given two binary trees (defined structure in C++ as follows), check if they are identical (same tree structure and the values to the nodes are also the same): /** …