Category: c / c++
You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move …
In a binary tree, a lonely node is a node that is the only child of its parent node. The root of the tree is not lonely because it …
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 …
Given two strings s1 and s2, write an algorithm to determine if s1 is one permutation of s2. For example: s1 = “abc”, s2 = “bca” output: true s1 …
In C++, there is no inbuilt split method for string. It is very useful to split a string into a vector of string. We can use the following string …