Day 059 medium

    652. Find Duplicate Subtrees

    Given the root of a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need...
    Day 058 medium

    427. Construct Quad Tree

    Given a n \* n matrix grid of 0's and 1's only. We want to represent the grid with a...
    Day 057 hard

    72. Edit Distance

    Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have...
    Day 056 easy

    121. Best Time to Buy and Sell Stock

    You are given an array prices where prices[i] is the price of a given stock on the ith day. You...
    Day 055 hard

    1675. Minimize Deviation in Array

    You are given an array nums of n positive integers. You can perform two types of operations on any element...
    Day 054 hard

    502. IPO

    Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital,...
    Day 053 medium

    1011. Capacity To Ship Packages Within D Days

    A conveyor belt has packages that must be shipped from one port to another within days days. The ith package...
    Day 052 medium

    540. Single Element in a Sorted Array

    You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element...
    Day 051 easy

    35. Search Insert Position

    Given a sorted array of distinct integers and a target value, return the index if the target is found. If...
    Day 050 medium

    103. Binary Tree Zigzag Level Order Traversal

    Given the root of a binary tree, return the zigzag level order traversal of its nodes’ values. (i.e., from left...
    Day 049 easy

    226. Invert Binary Tree

    Given the root of a binary tree, invert the tree, and return its root. Example Input: root = [4, 2,...
    Day 048 easy

    783. Minimum Distance Between BST Nodes

    Given the root of a Binary Search Tree (BST), return the minimum difference between the values of any two different...
    Day 047 easy

    104. Maximum Depth of Binary Tree

    Given the root of a binary tree, return its maximum depth. A binary tree’s maximum depth is the number of...
    Day 046 easy

    989. Add to Array-Form of Integer

    The array-form of an integer num is an array representing its digits in left to right order. For example, for...
    Day 045 easy

    67. Add Binary

    Given two binary strings a and b, return their sum as a binary string. Example Input: a = "11", b...
    Day 044 easy

    1523. Count Odd Numbers in an Interval Range

    Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive). Example Input:...
    Day 043 medium

    2477. Minimum Fuel Cost to Report to the Capital

    There is a tree (i.e., a connected, undirected graph with no cycles) structure country network consisting of n cities numbered...
    Day 042 medium

    1129. Shortest Path with Alternating Colors

    You are given an integer n, the number of nodes in a directed graph where the nodes are labeled from...
    Day 041 medium

    1162. As Far from Land as Possible

    Given an n x n grid containing only values 0 and 1, where 0 represents water and 1 represents land,...
    Day 040 hard

    2306. Naming a Company

    You are given an array of strings ideas that represents a list of names to be used in the process...
    Day 039 medium

    45. Jump Game II

    You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0]. Each element...
    Day 038 medium

    904. Fruit Into Baskets

    You are visiting a farm that has a single row of fruit trees arranged from left to right. The trees...
    Day 037 easy

    1470. Shuffle the Array

    Given the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn]. Return the array in the form [x1,y1,x2,y2,...,xn,yn]. Example:...
    Day 036 medium

    438. Find All Anagrams in a String

    Given two strings s and p, return an array of all the start indices of p’s anagrams in s. You...
    Day 035 medium

    567. Permutation in String

    Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other...
    Day 034 medium

    6. Zigzag Conversion

    The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want...
    Day 033 easy

    953. Verifying an Alien Dictionary

    In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of...
    Day 032 easy

    1071. Greatest Common Divisor of Strings

    For two strings s and t, we say “t divides s” if and only if s = t + ......
    Day 031 medium

    1626. Best Team With No Conflicts

    You are the manager of a basketball team. For the upcoming tournament, you want to choose the team with the...
    Day 030 easy

    1137. N-th Tribonacci Number

    The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 =...