Day 119 hard

    1697. Checking Existence of Edge Length Limited Paths

    An undirected graph of n nodes is defined by edgeList, where edgeList[i] = [ui, vi, disi] denotes an edge between...
    Day 118 hard

    839. Similar String Groups

    Two strings X and Y are similar if we can swap two letters (in different positions) of X, so that...
    Day 117 medium

    319. Bulb Switcher

    There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every...
    Day 116 easy

    258. Add Digits

    Given an integer num, repeatedly add all its digits until the result has only one digit, and return it. Example...
    Day 115 medium

    2336. Smallest Number in Infinite Set

    You have a set which contains all positive integers [1, 2, 3, 4, 5, ...]. Implement the SmallestInfiniteSet class: SmallestInfiniteSet()...
    Day 114 easy

    1046. Last Stone Weight

    You are given an array of integers stones where stones[i] is the weight of the ith stone. We are playing...
    Day 113 hard

    1416. Restore The Array

    A program was supposed to print an array of integers. The program forgot to print whitespaces and the array is...
    Day 112 hard

    1312. Minimum Insertion Steps to Make a String Palindrome

    Given a string s. In one step you can insert any character at any index of the string. Return the...
    Day 111 hard

    879. Profitable Schemes

    There is a group of n members, and a list of various crimes they could commit. The ith crime generates...
    Day 110 medium

    662. Maximum Width of Binary Tree

    Given the root of a binary tree, return the maximum width of the given tree. The maximum width of a...
    Day 109 medium

    1372. Longest ZigZag Path in a Binary Tree

    You are given the root of a binary tree. A ZigZag path for a binary tree is defined as follow:...
    Day 108 easy

    1768. Merge Strings Alternately

    You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1....
    Day 107 easy

    1431. Kids With the Greatest Number of Candies

    There are n kids with candies. You are given an integer array candies, where each candies[i] represents the number of...
    Day 106 hard

    1639. Number of Ways to Form a Target String Given a Dictionary

    You are given a list of strings of the same length words and a string target. Your task is to...
    Day 105 hard

    2218. Maximum Value of K Coins From Piles

    There are n piles of coins on a table. Each pile consists of a positive number of coins of assorted...
    Day 104 medium

    516. Longest Palindromic Subsequence

    Given a string s, find the longest palindromic subsequence’s length in s. A subsequence is a sequence that can be...
    Day 103 medium

    946. Validate Stack Sequences

    Given two integer arrays pushed and popped each with distinct values, return true if this could have been the result...
    Day 102 medium

    71. Simplify Path

    Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in...
    Day 101 medium

    2390. Removing Stars From a String

    You are given a string s, which contains stars *. In one operation, you can: Choose a star in s....
    Day 100 easy

    20. Valid Parentheses

    Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string...
    Day 099 hard

    1857. Largest Color Value in a Directed Graph

    There is a directed graph of n colored nodes and m edges. The nodes are numbered from 0 to n...
    Day 098 medium

    133. Clone Graph

    Given a reference of a node in a connected undirected graph. Return a deep copy (clone) of the graph. Each...
    Day 097 medium

    1020. Number of Enclaves

    You are given an m x n binary matrix grid, where 0 represents a sea cell and 1 represents a...
    Day 096 medium

    1254. Number of Closed Islands

    Given a 2D grid consists of 0s (land) and 1s (water). An island is a maximal 4-directionally connected group of...
    Day 095 medium

    2439. Minimize Maximum of Array

    You are given a 0-indexed array nums comprising of n non-negative integers. In one operation, you must: Choose an integer...
    Day 094 medium

    2405. Optimal Partition of String

    Given a string s, partition the string into one or more substrings such that the characters in each substring are...
    Day 093 medium

    881. Boats to Save People

    You are given an array people where people[i] is the weight of the ith person, and an infinite number of...
    Day 092 medium

    2300. Successful Pairs of Spells and Potions

    You are given two positive integer arrays spells and potions, of length n and m respectively, where spells[i] represents the...
    Day 091 easy

    704. Binary Search

    Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to...
    Day 090 hard

    1444. Number of Ways of Cutting a Pizza

    Given a rectangular pizza represented as a rows x cols matrix containing the following characters: 'A' (an apple) and '.'...