3248. Snake in Matrix
Problem There is a snake in an n x n matrix grid and can move in four possible directions. Each cell in the grid is identifie...
Problem There is a snake in an n x n matrix grid and can move in four possible directions. Each cell in the grid is identifie...
Problem You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how ...
Problem Given a positive integer n, write a function that returns the number of set bits in its binary representation (also k...
Problem Reverse bits of a given 32 bits unsigned integer. Note: Note that in some languages, such as Java, there is no unsig...
Problem Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structu...
Problem An image smoother is a filter of the size 3 x 3 that can be applied to each cell of an image by rounding down the ave...
Problem You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The lis...
Problem Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input str...
Problem Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is mi...
Problem Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked l...
Problem You are given a binary string s and an integer k. A binary string satisfies the k-constraint if either of the followi...
Problem You are given a n x n 2D array grid containing distinct elements in the range [0, n² - 1]. Implement the NeighborSum ...
Problem Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to tar...