319 challenges in the catalogue. Browse freely; sign in to open the editor and submit.
Reverse bits of a given 32-bit unsigned integer. Input: n = 43261596 (binary 00000010100101000001111010011100) Output: 964176192 (binary 00111001011110000010100101000000) Explanation: The input binary string…
Sign in to solveWrite a SQL query to find for each month and country, the number of transactions and their total amount, the number of approved transactions and their total amount. Return the result table with columns: month, country, trans_count,…
Sign in to solveGiven the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). Example 1: Example 2: The number of nodes in the tree is in the range [1, 1000]. -100 <= Node.val <= 100 Could you solve it both…
Sign in to solveGiven an array of integers preorder, which represents the preorder traversal of a BST (Binary Search Tree), construct the tree and return its root. It is guaranteed that for the given test cases, there is always possible to find a binary…
Sign in to solveGiven an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will be separated by at least one space. Return a string of the words in reverse order concatenated by a…
Sign in to solveGiven an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d < n a, b, c, and d are distinct. nums[a] + nums[b] + nums[c] + nums[d] == target You may…
Sign in to solveGiven an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array. Input: nums = [3,0,1] Output: 2 Explanation: n = 3 since there are 3 numbers, so all numbers are in…
Sign in to solveYou are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one…
Sign in to solveImplement an infinite scroll system that loads data in pages as the user scrolls. Build a controller that manages pagination state, loading status, and data accumulation. loadMore() — Fetches the next page and appends results. No-op if…
Sign in to solveGiven a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has…
Sign in to solveYou are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation. Evaluate the expression. Return an integer that represents the value of the expression. Note: The valid operators are +, -, *,…
Sign in to solveBuild a Feature Engineering Pipeline that applies a sequence of transformations to raw data and outputs a numerical feature matrix. The pipeline should support multiple transformation types and handle both numerical and categorical data.…
Sign in to solve