High Frequency
Given a list of integers nums, find the most frequently occurring element and return the number of occurrences of that element.
Given a list of integers nums, find the most frequently occurring element and return the number of occurrences of that element.
Given the root of a binary tree, return whether its height is balanced. That is, for every node in the tree, the absolute difference of the height of its lef...
Implement a hash table with the following methods:
Given an integer n, we apply this transformation until it becomes a 1: take each of the digits in n, square it, and then take their sum.
Given two integers x, and y return the number of positions where their values differ in their binary representations as a 32-bit integer.
Given a non-negative integer n, find a number r such that r * r = n and round down to the nearest integer.
Given a list of integers nums, return whether you can split the list into 1 or more groups where:
Given a list of positive integers nums, return the largest positive integer that divides each of the integers.
Given a number n, return a list of all prime numbers smaller than or equal to n in ascending order.
You are given a string s where each character is "L" meaning you moved one unit left, "R" meaning you moved one unit right, or "?" meaning either "L" or "R".
You are given an integer list nums containing 0s and 1s. Consider an operation where we pick an index i in nums and flip i as well as all numbers to the righ...
You are given a two-dimensional integer matrix matrix containing 1s and 0s. For each row in matrix, reverse the row. Then, flip each value in the matrix such...