K Closest Points to Origin using Custom Sorting Algorithm in C++/Java June 2, 2020 algorithms, c / c++, java, sorting No Comments We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is … [Continue Reading...]
How to Construct Binary Search Tree from Preorder Traversal? (C++ and Java) March 14, 2019 algorithms, c / c++, java, recursive No Comments Return the root node of a binary search tree that matches the given preorder traversal. (Recall that a binary search tree is a binary tree where for every node, … [Continue Reading...]