Day 089 hard

    87. Scramble String

    We can scramble a string s to get a string t using the following algorithm: If the length of the...
    Day 088 hard

    1402. Reducing Dishes

    A chef has collected data on the satisfaction level of his n dishes. Chef can cook any dish in 1...
    Day 087 medium

    983. Minimum Cost For Tickets

    You have planned some train traveling one year in advance. The days of the year in which you will travel...
    Day 086 medium

    64. Minimum Path Sum

    Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which...
    Day 085 hard

    2360. Longest Cycle in a Graph

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

    2316. Count Unreachable Pairs of Nodes in an Undirected Graph

    You are given an integer n. There is an undirected graph with n nodes, numbered from 0 to n -...
    Day 083 medium

    1466. Reorder Routes to Make All Paths Lead to the City Zero

    There are n cities numbered from 0 to n - 1 and n - 1 roads such that there is...
    Day 082 medium

    1319. Number of Operations to Make Network Connected

    There are n computers numbered from 0 to n - 1 connected by ethernet cables connections forming a network where...
    Day 081 medium

    2492. Minimum Score of a Path Between Two Cities

    You are given a positive integer n representing n cities numbered from 1 to n. You are also given a...
    Day 080 medium

    2348. Number of Zero-Filled Subarrays

    Given an integer array nums, return the number of subarrays filled with 0. A subarray is a contiguous non-empty sequence...
    Day 079 easy

    605. Can Place Flowers

    You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot...
    Day 078 medium

    211. Design Add and Search Words Data Structure

    Design a data structure that supports adding new words and finding if a string matches any previously added string. Implement...
    Day 077 medium

    1472. Design Browser History

    You have a browser of one tab where you start on the homepage and you can visit another url, get...
    Day 076 medium

    208. Implement Trie (Prefix Tree)

    A trie (pronounced as “try”) or prefix tree is a tree data structure used to efficiently store and retrieve keys...
    Day 075 medium

    106. Construct Binary Tree from Inorder and Postorder Traversal

    Given two integer arrays inorder and postorder where inorder is the inorder traversal of a binary tree and postorder is...
    Day 074 medium

    958. Check Completeness of a Binary Tree

    Given the root of a binary tree, determine if it is a complete binary tree. In a complete binary tree,...
    Day 073 medium

    129. Sum Root to Leaf Numbers

    You are given the root of a binary tree containing digits from 0 to 9 only. Each root-to-leaf path in...
    Day 072 easy

    101. Symmetric Tree

    Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center)....
    Day 071 hard

    23. Merge k Sorted Lists

    You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists...
    Day 070 medium

    109. Convert Sorted List to Binary Search Tree

    Given the head of a singly linked list where elements are sorted in ascending order, convert it to a height-balanced...
    Day 069 medium

    382. Linked List Random Node

    Given a singly linked list, return a random node’s value from the linked list. Each node must have the same...
    Day 068 medium

    142. Linked List Cycle II

    Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return...
    Day 067 medium

    875. Koko Eating Bananas

    Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have...
    Day 066 medium

    2187. Minimum Time to Complete Trips

    You are given an array time where time[i] denotes the time taken by the ith bus to complete one trip....
    Day 065 easy

    1539. Kth Missing Positive Number

    Given an array arr of positive integers sorted in a strictly increasing order, and an integer k. Return the kth...
    Day 064 hard

    1345. Jump Game IV

    Given an array of integers arr, you are initially positioned at the first index of the array. In one step...
    Day 063 hard

    2444. Count Subarrays With Fixed Bounds

    You are given an integer array nums and two integers minK and maxK. A fixed-bound subarray of nums is a...
    Day 062 medium

    28. Find the Index of the First Occurrence in a String

    Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if...
    Day 061 medium

    443. String Compression

    Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each...
    Day 060 medium

    912. Sort an Array

    Given an array of integers nums, sort the array in ascending order and return it. You must solve the problem...