Dec 2, 2025
Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order...
leetcodealgorithmmediumcpparraytwo-pointerssortingproblem-solving
Dec 2, 2025
Given the coordinates of four points in 2D space p1, p2, p3, and p4, return true if the four points construct a square.
leetcodealgorithmmediumcppmathgeometryproblem-solving
Dec 2, 2025
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.
leetcodealgorithmmediumcppdesigndata-structureshash-maplinked-listproblem-solving
Dec 2, 2025
Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.
leetcodealgorithmmediumcppdesigndata-structureshash-maplinked-listproblem-solving
Nov 24, 2025
[Medium] Round Trip Ticket Cost Minimization
algorithmmediumcpparrayoptimizationproblem-solving
Nov 24, 2025
You have planned some train traveling one year in advance. The days of the year in which you will travel are given as an integer array days. Each day is...
leetcodealgorithmmediumcppdynamic-programmingproblem-solving
Nov 24, 2025
Given a string s, return the number of palindromic substrings in it.
leetcodealgorithmmediumcppstringtwo-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....
leetcodealgorithmmediumcpparraysortingintervalproblem-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.
leetcodealgorithmmediumcppdesignbinary-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....
leetcodealgorithmmediumcpphash-tablereservoir-samplingproblem-solving