You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains an integer followed by zero, …
The FizzBuzz is a good example to start learning a programming language – which contains the exercise of using a loop (either for-loop or a while-loop), Arithmetic operations (modulus), …
Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the …
The Singleton design is one of the must-known design pattern if you prepare for your technical interviews (Big IT companies have design questions apart from coding questions). The Singleton …
Quicksort is the de-factor sorting algorithm that is widely used. Its average runtime complexity is O(nlogn) and it’s usually implemented in either recursion or iterative style. Quicksort can be …
Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all …