-
Two number sum
[3, 5, -4, 8, 11, 1, -1, 6]
, 10
Task: check if there are two numbers in an array which sum equals to required, i.e. 11 + (-1) = 10 -
Validate subsequence
[5, 1, 22, 25, 6, -1, 8, 10]
,[1, 6, -1, 10]
Task: check if the second array is a valid subsequence of the first one -
Find the closest value in binary search tree
Task: find the closest value to the target value that contain in the bst -
Branch sums
Task: find sums of all branches in binary tree -
Node depth
Task: find sum of all nodes depths -
Three numbers sum
Task: find all possible three numbers combinations which sum is equal to required -
Subbaray sort
Task: find minimum sub array when sorted is going make entire array sorted -
Binary search tree construction
Task: construct BST with following methods:
- insertion
- searching
- deletion
-
Validate binary search tree
Task: validate BST -
Quick sort
Task: implement quick sort algorithm -
Spiral Traverse
Task: write a function that returns a 1-dimensional array from 2-dimensional array in spiral order -
BST Traversal
Task: traverse BST -
Merge Sort
Task: sort array usingmerge sort
-
Heap Sort
Task: sort array usingheap sort
-
Move element to end
Task: move element(s) to the end of an array -
Invert binary tree
Task: invert a provided binary tree