Day 029 hard

    460. LFU Cache

    Design and implement a data structure for a Least Frequently Used (LFU) cache. Implement the LFUCache class: LFUCache(int capacity) Initializes...
    Day 028 hard

    352. Data Stream as Disjoint Intervals

    Given a data stream input of non-negative integers a1, a2, ..., an, summarize the numbers seen so far as a...
    Day 027 hard

    472. Concatenated Words

    Given an array of strings words (without duplicates), return all the concatenated words in the given list of words. A...
    Day 026 medium

    787. Cheapest Flights Within K Stops

    There are n cities connected by some number of flights. You are given an array flights where flights[i] = [fromi,...
    Day 025 medium

    2359. Find Closest Node to Given Two Nodes

    You are given a directed graph of n nodes numbered from 0 to n - 1, where each node has...
    Day 025 medium

    909. Snakes and Ladders

    You are given an n x n integer matrix board where the cells are labeled from 1 to n2 in...
    Day 023 easy

    997. Find the Town Judge

    In a town, there are n people labeled from 1 to n. There is a rumor that one of these...
    Day 022 medium

    131. Palindrome Partitioning

    Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome...
    Day 021 medium

    93. Restore IP Addresses

    A valid IP address consists of exactly four integers separated by single dots. Each integer is between 0 and 255...
    Day 020 medium

    491. Non-decreasing Subsequences

    Given an integer array nums, return all the different possible non-decreasing subsequences of the given array with at least two...
    Day 019 medium

    974. Subarray Sums Divisible by K

    Given an integer array nums and an integer k, return the number of non-empty subarrays that have a sum divisible...
    Day 018 medium

    918. Maximum Sum Circular Subarray

    Given a circular integer array nums of length n, return the maximum possible sum of a non-empty subarray of nums....
    Day 017 medium

    926. Flip String to Monotone Increasing

    A binary string is monotone increasing if it consists of some number of 0’s (possibly none), followed by some number...
    Day 016 medium

    57. Insert Interval

    You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end...
    Day 015 hard

    2421. Number of Good Paths

    There is a tree (i.e. a connected, undirected graph with no cycles) consisting of n nodes numbered from 0 to...
    Day 014 medium

    1061. Lexicographically Smallest Equivalent String

    You are given two strings of the same length s1 and s2 and a string baseStr. We say s1[i] and...
    Day 013 hard

    2246. Longest Path With Different Adjacent Characters

    You are given a tree (i.e. a connected, undirected graph that has no cycles) rooted at node 0 consisting of...
    Day 012 medium

    1519. Number of Nodes in the Sub-Tree With the Same Label

    You are given a tree (i.e. a connected, undirected graph that has no cycles) consisting of n nodes numbered from...
    Day 011 medium

    1443. Minimum Time to Collect All Apples in a Tree

    Given an undirected tree consisting of n vertices numbered from 0 to n-1, which has some apples in their vertices....
    Day 010 easy

    100. Same Tree

    Given the roots of two binary trees p and q, write a function to check if they are the same...
    Day 009 easy

    144. Binary Tree Preorder Traversal

    Given the root of a binary tree, return the preorder traversal of its nodes’ values. Input: root = [1,null,2,3] Output:...
    Day 008 hard

    149. Max Points on a Line

    Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane, return the maximum...
    Day 007 medium

    134. Gas Station

    There are n gas stations along a circular route, where the amount of gas at the ith station is gas[i]....
    Day 006 medium

    1833. Maximum Ice Cream Bars

    It is a sweltering summer day, and a boy wants to buy some ice cream bars. At the store, there...
    Day 005 medium

    452. Minimum Number of Arrows to Burst Balloons

    There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a...
    Day 004 medium

    2244. Minimum Rounds to Complete All Tasks

    There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a...
    Day 003 easy

    944. Delete Columns to Make Sorted

    You are given an array of n strings strs, all of the same length. The strings can be arranged such...
    Day 002 easy

    520. Detect Capital

    We define the usage of capitals in a word to be right when one of the following cases holds: All...
    Day 001 easy

    290. Word Pattern

    Given a pattern and a string s, find if s follows the same pattern. Here follow means a full match,...