Tag: c++
Given an array of integers, every element appears twice except for one. Find that single one. Your algorithm should have a linear runtime complexity. Implement it without using extra …
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. * …