You are given an integer array nums. The unique elements of an array are the elements that appear exactly once in the array. Return the sum of all the …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary tree root, return whether all leaves are at the same level. Constraints n ≤ 100,000 where n …
Given an integer n, you can swap any two digits at most once. Return the maximum value of the resulting number. Constraints 0 ≤ n < 2 ** 31 …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary tree root, return whether all leaves are at the same level. Constraints n ≤ 100,000 where n …
Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and …
Teaching Kids Programming: Videos on Data Structures and Algorithms Given a binary search tree root, an integer lo, and another an integer hi, remove all nodes that are not …