Category: data structure
Question: Given an array and a element, remove all instances of that value in place and return the new length. The order of elements can be changed and it …
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): /** …
Well, I have a detailed post that presents two solutions to solve the classic n-queen problem. The problem asks you to find the number of solutions to put n queens in …
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf …
Bubble sort is a very simple sorting technique that has the average and worst-case complexity . It swaps each time neighbouring two elements if it is not in order. …