You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 0034 |[Find First and Last Position of Element in Sorted Array](src/main/js/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/solution.js)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 0 | 100.00
112
112
| 0033 |[Search in Rotated Sorted Array](src/main/js/g0001_0100/s0033_search_in_rotated_sorted_array/solution.js)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 0 | 100.00
113
+
| 0074 |[Search a 2D Matrix](src/main/js/g0001_0100/s0074_search_a_2d_matrix/solution.js)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Matrix, Big_O_Time_O(endRow+endCol)_Space_O(1) | 0 | 100.00
Given an array `nums` with `n` objects colored red, white, or blue, sort them **[in-place](https://en.wikipedia.org/wiki/In-place_algorithm)** so that objects of the same color are adjacent, with the colors in the order red, white, and blue.
6
+
7
+
We will use the integers `0`, `1`, and `2` to represent the color red, white, and blue, respectively.
8
+
9
+
You must solve this problem without using the library's sort function.
10
+
11
+
**Example 1:**
12
+
13
+
**Input:** nums = [2,0,2,1,1,0]
14
+
15
+
**Output:**[0,0,1,1,2,2]
16
+
17
+
**Example 2:**
18
+
19
+
**Input:** nums = [2,0,1]
20
+
21
+
**Output:**[0,1,2]
22
+
23
+
**Constraints:**
24
+
25
+
*`n == nums.length`
26
+
*`1 <= n <= 300`
27
+
*`nums[i]` is either `0`, `1`, or `2`.
28
+
29
+
**Follow up:** Could you come up with a one-pass algorithm using only constant extra space?
Given two strings `s` and `t` of lengths `m` and `n` respectively, return _the **minimum window substring** of_`s`_such that every character in_`t`_(**including duplicates**) is included in the window. If there is no such substring__, return the empty string_`""`_._
6
+
7
+
The testcases will be generated such that the answer is **unique**.
8
+
9
+
A **substring** is a contiguous sequence of characters within the string.
10
+
11
+
**Example 1:**
12
+
13
+
**Input:** s = "ADOBECODEBANC", t = "ABC"
14
+
15
+
**Output:** "BANC"
16
+
17
+
**Explanation:** The minimum window substring "BANC" includes 'A', 'B', and 'C' from string t.
18
+
19
+
**Example 2:**
20
+
21
+
**Input:** s = "a", t = "a"
22
+
23
+
**Output:** "a"
24
+
25
+
**Explanation:** The entire string s is the minimum window.
26
+
27
+
**Example 3:**
28
+
29
+
**Input:** s = "a", t = "aa"
30
+
31
+
**Output:** ""
32
+
33
+
**Explanation:** Both 'a's from t must be included in the window. Since the largest window of s only has one 'a', return empty string.
34
+
35
+
**Constraints:**
36
+
37
+
*`m == s.length`
38
+
*`n == t.length`
39
+
* <code>1 <= m, n <= 10<sup>5</sup></code>
40
+
*`s` and `t` consist of uppercase and lowercase English letters.
41
+
42
+
**Follow up:** Could you find an algorithm that runs in `O(m + n)` time?
0 commit comments