Nov 14, 2025
Design and implement a data structure for a Least Frequently Used (LFU) cache.
leetcodealgorithmhardcppdesigndata-structureshash-maplinked-listproblem-solving
Nov 14, 2025
The stack is one of the most versatile data structures in coding interviews. Whether you’re matching parentheses, evaluating expressions, or finding the next greater element in an array, a stack...
leetcodetemplatesstackdata-structures
Nov 14, 2025
Minimal, copy-paste Python for expression evaluation with +, −, ×, ÷ and parentheses. See also Stack for RPN and nested expressions.
leetcodetemplatescalculatorexpression-evaluation
Nov 14, 2025
Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation.
leetcodealgorithmmediumcppstringstackexpression-evaluationproblem-solving
Nov 14, 2025
Implement a basic calculator to evaluate a simple expression string.
leetcodealgorithmhardcppstringstackrecursionexpression-evaluationproblem-solving
Nov 14, 2025
Given a string s which represents an expression, evaluate this expression and return its value.
leetcodealgorithmmediumcppstringstackexpression-evaluationproblem-solving
Nov 5, 2025
Rearrange nums such that nums[0] < nums[1] > nums[2] < nums[3] ... (wiggle order).
leetcodealgorithmmediumcpparraysnth-elementthree-way-partitionindex-mappingproblem-solving
Nov 5, 2025
A parentheses string is valid if and only if:
leetcodealgorithmmediumcppstringstackgreedyproblem-solving
Nov 5, 2025
Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
leetcodealgorithmeasycppstringstackproblem-solving
Nov 5, 2025
Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1.
leetcodealgorithmmediumcpparrayshash-mapprefix-sumproblem-solving