Category: c / c++
Given a BST (Binary Search Tree) with duplicates, find its mode(s) – the most frequently occurred element. A BST has the following characteristics: The left subtree of a node …
Given a binary tree, compute the average values for the nodes on each level and return them in the form of an array. For example: Input: 3 / \ …
A Queue implements First In First Out while a Stack is First In Last Out. It is possible to implement a queue using two stacks. When an item is …
The C is the subset of C++ and hence many C programmers that come from embedded background claim they can write proper C++ code. So here is a task …
Similar to Parity Sorting, the Index Parity Sorting can be applied to an array of integers that have equal number of even numbers and odd numbers. You are to …