Category: c / c++
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or …
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, …
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 …
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 …