Nov 24, 2025
Given a string s, return the number of palindromic substrings in it.
leetcodealgorithmmediumjavastringtwo-pointersproblem-solving
Nov 24, 2025
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input....
leetcodealgorithmmediumjavaarraysortingintervalproblem-solving
Nov 24, 2025
You are given a 0-indexed array of positive integers w where w[i] describes the weight of the ith index.
leetcodealgorithmmediumjavadesignbinary-searchprefix-sumproblem-solving
Nov 24, 2025
Given an integer array nums with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array....
leetcodealgorithmmediumjavahash-tablereservoir-samplingproblem-solving
Nov 24, 2025
Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is...
leetcodealgorithmmediumjavagraphtwo-pointersproblem-solving
Nov 24, 2025
There are n buildings in a line. You are given an integer array heights of size n that represents the heights of the buildings in the line.
leetcodealgorithmmediumjavaarraystackmonotonic-stackproblem-solving
Nov 24, 2025
You are given the root of a binary tree containing digits from 0 to 9 only.
leetcodealgorithmmediumjavatreedfsproblem-solving
Nov 24, 2025
You are given a string s and an integer k, a k duplicate removal consists of choosing k adjacent and equal letters from s and removing them, causing the left...
leetcodealgorithmmediumjavastringstacktwo-pointersproblem-solving
Nov 24, 2025
Given a robot cleaner in a room modeled as a grid.
leetcodealgorithmhardjavadfsbacktrackingproblem-solving
Nov 24, 2025
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
leetcodealgorithmhardjavastringdynamic-programmingstackproblem-solving