Mar 16, 2026
You are given a 2D array intervals where intervals[i] = [left_i, right_i] represents the inclusive interval [left_i, right_i]. Divide the intervals into one or more groups such that no two...
leetcodemediumgreedyheapintervals
Mar 15, 2026
A gene string is represented by an 8-character string of 'A', 'C', 'G', and 'T'. Given startGene, endGene, and a bank of valid gene strings, return the minimum number of...
leetcodemediumbfsstring
Mar 12, 2026
There are n rooms labeled 0 to n-1. All rooms are locked except room 0. Each room contains a set of keys to other rooms. Given rooms[i] – the set...
leetcodemediumgraphdfsbfs
Mar 11, 2026
Given an n x n binary matrix grid, return the length of the shortest clear path from top-left (0,0) to bottom-right (n-1,n-1). A clear path consists of cells with value...
leetcodemediumgraphbfs
Mar 10, 2026
There are n computers numbered 0 to n-1 connected by cables. connections[i] = [a, b] means a cable connects computers a and b. You can remove an existing cable and...
leetcodemediumgraphdsu
Mar 10, 2026
Given the head of a singly linked list, return the middle node. If there are two middle nodes, return the second middle node.
leetcodeeasylinked-listtwo-pointers
Mar 9, 2026
You are given a string s and an array of index pairs pairs where pairs[i] = [a, b] indicates you can swap the characters at indices a and b any...
leetcodemediumstringgraphdsu
Mar 8, 2026
You are given an array points where points[i] = [xi, yi] represents a point on the 2D plane. The cost to connect two points is the Manhattan distance: |xi -...
leetcodemediumgraphmstdsu
Mar 7, 2026
We can “shift” a string by shifting each character to its successive character (with z wrapping to a). For example, "abc" can be shifted to "bcd", …, "xyz", "yza", "zab"....
leetcodemediumstringhash
Mar 7, 2026
Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine. Each letter in magazine can only be used once.
leetcodeeasystringhash