Tag: c++
Given a binary search tree root, convert it to a singly linked list using level order traversal. Constraints 1 ≤ n ≤ 100,000 where n is the number of …
Given a string s representing a number in base 3 (consisting only of 0, 1, or 2), return its decimal integer equivalent. Example 1 Input s = “10” Output …
You are given two binary search trees a and b and an integer target. Return whether there’s a number in a and a number in b such that their …
You are given two lists of integers weights and values which have the same length and an integer capacity. weights and values represent the weight and value of the …
You are given integers n, e, o, t. You have n dollars in principal that you invested in the stock market. Given the stock market alternates between first returning …