319 challenges in the catalogue. Browse freely; sign in to open the editor and submit.
Implementing "Offline-First" capability is one of the most challenging parts of mobile development. A robust sync engine must handle local changes, remote updates, and resolve conflicts when the same data is modified on both sides. In this…
Sign in to solveGiven the head of a singly linked list, reverse the list, and return the reversed list. Example 1: Example 2: Example 3: The number of nodes in the list is the range [0, 5000]. -5000 <= Node.val <= 5000 A linked list can be reversed either…
Sign in to solveGiven a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed…
Sign in to solveOAuth 2.0 is the industry-standard protocol for authorization. The Authorization Code Flow is the most commonly used flow, designed for secure server-side applications. In this challenge, you will implement the logic for an Authorization…
Sign in to solveGiven two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other words, return true if one of s1's permutations is the substring of s2. Input: s1 = "ab", s2 = "eidbaooo" Output: true Explanation: s2…
Sign in to solveDesign a distributed, durable, and highly scalable message queue system similar to Apache Kafka or RabbitMQ. The system must support asynchronous communication between multiple producers and consumers through a Publish-Subscribe (Pub-Sub)…
Sign in to solveImplement the K-Nearest Neighbors (KNN) classification algorithm from scratch. Given labeled training data, classify new test points by finding the K closest training points and using majority voting. Compute Euclidean distance between…
Sign in to solveDesign your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle and the last position is connected back to the first…
Sign in to solveGiven an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal or false otherwise. Example 1: Example 2: 1 <= nums.length <= 200 1 <= nums[i] <= 100
Sign in to solveGiven the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. A leaf is a node with no children. Example 1: Example 2: Example…
Sign in to solveDesign and implement a data structure for a Least Frequently Used (LFU) cache. Implement the LFUCache class: LFUCache(int capacity) Initializes the object with the capacity of the data structure. int get(int key) Gets the value of the key…
Sign in to solveYou are tasked with creating a production-ready multi-stage Dockerfile for a Node.js TypeScript application. Multi-stage builds allow you to use multiple FROM statements in your Dockerfile, each starting a new build stage. You can…
Sign in to solve