Category: algorithms
You are given a list of integers seats containing 1s and 0s. Each element seats represents a seat and is either occupied if seats = 1 or empty if …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary search tree root and an integer val, determine whether val is in the tree. Constraints n ≤ …
When unit testing, you often want to assert two things are equal. This is common for maps (dictionaries), where you may have a return map and the expected one. …
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 …