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
| 0167 |[Two Sum II - Input Array Is Sorted](src/main/ts/g0101_0200/s0167_two_sum_ii_input_array_is_sorted/solution.ts)| Medium | Array, Binary_Search, Two_Pointers | 0 | 100.00
| 0167 |[Two Sum II - Input Array Is Sorted](src/main/ts/g0101_0200/s0167_two_sum_ii_input_array_is_sorted/solution.ts)| Medium | Array, Binary_Search, Two_Pointers | 0 | 100.00
1045
1051
| 0011 |[Container With Most Water](src/main/ts/g0001_0100/s0011_container_with_most_water/solution.ts)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Greedy, Two_Pointers, Big_O_Time_O(n)_Space_O(1) | 2 | 80.13
| 0033 |[Search in Rotated Sorted Array](src/main/ts/g0001_0100/s0033_search_in_rotated_sorted_array/solution.ts)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 0 | 100.00
1186
1194
| 0034 |[Find First and Last Position of Element in Sorted Array](src/main/ts/g0001_0100/s0034_find_first_and_last_position_of_element_in_sorted_array/solution.ts)| Medium | Top_100_Liked_Questions, Top_Interview_Questions, Array, Binary_Search, Big_O_Time_O(log_n)_Space_O(1) | 0 | 100.00
1187
1195
| 0153 |[Find Minimum in Rotated Sorted Array](src/main/ts/g0101_0200/s0153_find_minimum_in_rotated_sorted_array/solution.ts)| Medium | Top_100_Liked_Questions, Array, Binary_Search, Big_O_Time_O(log_N)_Space_O(log_N) | 0 | 100.00
| 0167 |[Two Sum II - Input Array Is Sorted](src/main/ts/g0101_0200/s0167_two_sum_ii_input_array_is_sorted/solution.ts)| Medium | Array, Binary_Search, Two_Pointers | 0 | 100.00
| 0151 |[Reverse Words in a String](src/main/ts/g0101_0200/s0151_reverse_words_in_a_string/solution.ts)| Medium | String, Two_Pointers, Udemy_Strings, Top_Interview_150_Array/String | 0 | 100.00
Given an array of `points` where <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> represents a point on the **X-Y** plane, return _the maximum number of points that lie on the same straight line_.
Evaluate the value of an arithmetic expression in [Reverse Polish Notation](http://en.wikipedia.org/wiki/Reverse_Polish_notation).
6
+
7
+
Valid operators are `+`, `-`, `*`, and `/`. Each operand may be an integer or another expression.
8
+
9
+
**Note** that division between two integers should truncate toward zero.
10
+
11
+
It is guaranteed that the given RPN expression is always valid. That means the expression would always evaluate to a result, and there will not be any division by zero operation.
Given an input string `s`, reverse the order of the **words**.
6
+
7
+
A **word** is defined as a sequence of non-space characters. The **words** in `s` will be separated by at least one space.
8
+
9
+
Return _a string of the words in reverse order concatenated by a single space._
10
+
11
+
**Note** that `s` may contain leading or trailing spaces or multiple spaces between two words. The returned string should only have a single space separating the words. Do not include any extra spaces.
12
+
13
+
**Example 1:**
14
+
15
+
**Input:** s = "the sky is blue"
16
+
17
+
**Output:** "blue is sky the"
18
+
19
+
**Example 2:**
20
+
21
+
**Input:** s = " hello world "
22
+
23
+
**Output:** "world hello"
24
+
25
+
**Explanation:** Your reversed string should not contain leading or trailing spaces.
26
+
27
+
**Example 3:**
28
+
29
+
**Input:** s = "a good example"
30
+
31
+
**Output:** "example good a"
32
+
33
+
**Explanation:** You need to reduce multiple spaces between two words to a single space in the reversed string.
34
+
35
+
**Example 4:**
36
+
37
+
**Input:** s = " Bob Loves Alice "
38
+
39
+
**Output:** "Alice Loves Bob"
40
+
41
+
**Example 5:**
42
+
43
+
**Input:** s = "Alice does not even like bob"
44
+
45
+
**Output:** "bob like even not does Alice"
46
+
47
+
**Constraints:**
48
+
49
+
* <code>1 <= s.length <= 10<sup>4</sup></code>
50
+
*`s` contains English letters (upper-case and lower-case), digits, and spaces `' '`.
51
+
* There is **at least one** word in `s`.
52
+
53
+
**Follow-up:** If the string data type is mutable in your language, can you solve it **in-place** with `O(1)` extra space?
A peak element is an element that is strictly greater than its neighbors.
6
+
7
+
Given an integer array `nums`, find a peak element, and return its index. If the array contains multiple peaks, return the index to **any of the peaks**.
8
+
9
+
You may imagine that `nums[-1] = nums[n] = -∞`.
10
+
11
+
You must write an algorithm that runs in `O(log n)` time.
12
+
13
+
**Example 1:**
14
+
15
+
**Input:** nums = [1,2,3,1]
16
+
17
+
**Output:** 2
18
+
19
+
**Explanation:** 3 is a peak element and your function should return the index number 2.
20
+
21
+
**Example 2:**
22
+
23
+
**Input:** nums = [1,2,1,3,5,6,4]
24
+
25
+
**Output:** 5
26
+
27
+
**Explanation:** Your function can return either index number 1 where the peak element is 2, or index number 5 where the peak element is 6.
0 commit comments