Stories, Tutorials
& Life Tips
Deep dives on coding, health, recipes, travel and everything in between.
📍 Explore Reading Paths
Follow curated journeys from beginner to expert
Minimum Subsequence in Non-Increasing Order - Greedy - Easy - LeetCode
Given the array nums, obtain a subsequence of the array whose sum of elements is strictly greater than the sum of the non included elements in such subsequence. If there are multiple solutions, …
Maximize Sum Of Array After K Negations - Greedy - Easy - LeetCode
Given an array A of integers, we must modify the array in the following way: we choose an i and replace A[i] with -A[i],…
Delete Columns to Make Sorted - Greedy - Easy - LeetCode
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion in…
Walking Robot Simulation - Greedy - Easy - LeetCode
A robot on an infinite grid starts at point (0, 0) and faces north. The robot can receive one of three possible ty…
Lemonade Change - Greedy - Easy - LeetCode
At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a…
Assign Cookies - Greedy - Easy - LeetCode
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most on…
Last Stone Weight - Heap - Easy - LeetCode
We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the two heaviest stones a…
Kth Largest Element in a Stream - Heap - Easy - LeetCode
Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order,…
Crawler Log Folder - Stacks - Easy - LeetCode
The Leetcode file system keeps a log each time some user performs a change folder operation. The operations are describe…
Build an Array With Stack Operations - Stacks - Easy - LeetCode
Given an array target and an integer n. In each iteration, you will read a number from list = {1,2,3..., n}. Build…
Remove All Adjacent Duplicates In String - Stacks - Easy - LeetCode
Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and remo…
Remove Outermost Parentheses - Stacks - Easy - LeetCode
A valid parentheses string is either empty (""), "(" + A + ")", or A + B, where A and B are valid parentheses strings, a…
Baseball Game - Stacks - Easy - LeetCode
You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types: Int…
Next Greater Element I - Stacks - Easy - LeetCode
You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all…
Implement Queue using Stacks - Stack - Easy - LeetCode
Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of the queue.pop() -- …