# Leetcode 4. Median of Two Sorted Arrays

[hard]

Given two sorted arrays `nums1` and `nums2` of size `m` and `n` respectively, return the median of the two sorted arrays.

The overall run time complexity should be `O(log (m+n))`.

Example 1:

`Input: nums1 = [1,3], nums2 = Output: 2.00000 …`

# Leetcode 277. Find the Celebrity

[medium]

Suppose you are at a party with `n` people (labeled from `0` to `n - 1`), and among them, there may exist one celebrity. The definition of a celebrity is that all the other `n - 1` people know him/her, but he/she does not know any of them.

Now…

# Leetcode 253 Meeting Rooms II

Given an array of meeting time intervals `intervals` where `intervals[i] = [starti, endi]`, return the minimum number of conference rooms required.

Example 1:

`Input: intervals = [[0,30],[5,10],[15,20]]Output: 2`

Example 2:

`Input: intervals = [[7,10],[2,4]]Output: 1`

Constraints:

• `1 <= intervals.length <= 104`
• `0 <= starti < endi <= 106`

# Leetcode 496. Next Greater Element I

[easy]

The next greater element of some element `x` in an array is the first greater element that is to the right of `x` in the same array.

You are given two distinct 0-indexed integer arrays `nums1` and `nums2`, where `nums1` is a subset of `nums2`.

For each `0 <=…`

# Leetcode 209. Minimum Size Subarray Sum

[medium]

Given an array of positive integers `nums` and a positive integer `target`, return the minimal length of a contiguous subarray `[numsl, numsl+1, ..., numsr-1, numsr]` of which the sum is greater than or equal to `target`. If there is no such subarray, return `0` instead.

Example 1:

`Input: target…`

# Leetcode 844. Backspace String Compare

[easy][IBM]

Given two strings `s` and `t`, return `true` if they are equal when both are typed into empty text editors. `'#'` means a backspace character.

Note that after backspacing an empty text, the text will continue empty.

Example 1:

`Input: s = "ab#c", t = "ad#c"Output: trueExplanation: Both s…`

# Leetcode 764. Largest Plus Sign

[medium]

You are given an integer `n`. You have an `n x n` binary grid `grid` with all values initially `1`'s except for some indices given in the array `mines`. The `ith` element of the array `mines` is defined as `mines[i] = [xi, yi]` where `grid[xi][yi] == 0`.

Return the…

# Leetcode 1629. Slowest Key

[easy]

A newly designed keypad was tested, where a tester pressed a sequence of `n` keys, one at a time.

You are given a string `keysPressed` of length `n`, where `keysPressed[i]` was the `ith` key pressed in the testing sequence, and a sorted list `releaseTimes`, where `releaseTimes[i]` was the time…

# Leetcode 1028. Recover a Tree From Preorder Traversal

[hard]

We run a preorder depth-first search (DFS) on the `root` of a binary tree.

At each node in this traversal, we output `D` dashes (where `D` is the depth of this node), then we output the value of this node. If the depth of a node is `D`, the…

# Leetcode 283. Move Zeroes

[easy]

Given an integer array `nums`, move all `0`'s to the end of it while maintaining the relative order of the non-zero elements.

Note that you must do this in-place without making a copy of the array.

Example 1:

`Input: nums = [0,1,0,3,12]Output: [1,3,12,0,0]`

Example 2:

`Input: nums =…` ## Gary Chiang

CS new grad, 6 years experience related to supply chain management. Located in Bay area