Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 402. Remove K Digits
Given a numeric string, remove exactly k digits (preserving the remaining order) to form the smallest possible integer, trimming leading zeros and returning "0" if nothing remains. This is a greedy/monotonic-stack style problem where you remove digits that create larger prefixes to minimize the result under the constraint k ≤ n.
Asked at:
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid November, 2024
Amazon
Junior
Minimize memory consumption in an Amazon Data Center by removing a contiguous segment of processes. Given a list of processes with their memory consumption and a number m, remove m contiguous processes to minimize total memory usage.
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.