LeetCode 225. Implement Stack using Queues
Description https://leetcode.com/problems/implement-queue-using-stacks/ Implement a last in first out (LIFO) stack using only two queues. The implemented stack should support all…
Be a Good Techer and Tech for Good. www.goodtecher.com
Description https://leetcode.com/problems/implement-queue-using-stacks/ Implement a last in first out (LIFO) stack using only two queues. The implemented stack should support all…
Description https://leetcode.com/problems/intersection-of-two-arrays/ Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 =…
Description https://leetcode.com/problems/arranging-coins/ You have a total of n coins that you want to form in a staircase shape, where every k-th row must…
Description https://leetcode.com/problems/reverse-words-in-a-string/ Given an input string s, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in s will…
Description https://leetcode.com/problems/two-sum-less-than-k/ Given an array nums of integers and integer k, return the maximum sum such that there exists i < j with nums[i] + nums[j] = sum and sum <…
Description https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ Given an array of integers numbers that is already sorted in ascending order, find two numbers such that they add up…
Description https://leetcode.com/problems/high-five/ Given a list of the scores of different students, items, where items[i] = [IDi, scorei] represents one score from a student…
Description https://leetcode.com/problems/to-lower-case/ Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1:…
Description https://leetcode.com/problems/running-sum-of-1d-array/ Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Return the running sum…
Description https://leetcode.com/problems/swap-nodes-in-pairs/ You are given the root of a binary search tree (BST) and an integer val. Find the node in the BST…