Category: c / c++
Given two lists Aand B, and B is an anagram of A. B is an anagram of A means B is made by randomizing the order of the elements …
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, …
On an 8 x 8 chessboard, there is one white rook. There also may be empty squares, white bishops, and black pawns. These are given as characters ‘R’, ‘.’, …
Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = , nums2 = Output: Example 2: Input: nums1 = , nums2 = Output: Note: …
In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as every …