A Stack is a data structure that satisfies Last-In-First-Out. It can be considered as a pile of plates where you always take the top plate (you put on last). …
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 …
Question: Given an integer (maximum 100), compute the number of distinct ways to split the number using non-negative integer numbers. For example, given 5, there are 7 ways to …
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 …