Category: Fundamentals


Dedupe an array in javascript

Input : An array Output : An array Logic : Iterate over the input array called data Add the element to the output array called result if the element does not exist in the...


Sort the stack in ascending order

Problem : Sort the given stack into an ascending order without using recursion. Logic: Pop an item from the original stack and push it onto the sorted stack. If the poped item from the...


Introduction to backtracking

Backtracking is a general algorithmic technique that considers searching every possible combination in order to solve a problem. It is also known as depth-first search or branch and bound. It is an important tool...