Coding questions Flashcards

1
Q

A peak element is an element that is strictly greater than its neighbors.

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.

You may imagine that nums[-1] = nums[n] = -∞.

You must write an algorithm that runs in O(log n) time.

nums = [1,2,3,1]
output = 2
A

https://leetcode.com/problems/find-peak-element/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. Reverse Words in a String
A

https://leetcode.com/problems/reverse-words-in-a-string/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. 3Sum
A

https://leetcode.com/problems/3sum/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. Ways to Split Array Into Three Subarrays
A

https://leetcode.com/problems/ways-to-split-array-into-three-subarrays/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. Circular Array Group
A

https://leetcode.com/problems/circular-array-loop/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Split two strings to make it palindrome
A

https://leetcode.com/problems/split-two-strings-to-make-palindrome/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. Compare Version Numbers
A

https://leetcode.com/problems/compare-version-numbers/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. Valid Word Abbreviation
A

https://leetcode.com/problems/valid-word-abbreviation/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. 3Sum Closest
A

https://leetcode.com/explore/challenge/card/july-leetcoding-challenge-2021/611/week-4-july-22nd-july-28th/3828/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. 3Sum Smaller
A

https://leetcode.com/problems/3sum-smaller/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. Search in Rotated Sorted Array
A

https://leetcode.com/problems/search-in-rotated-sorted-array/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. Find Minimum in Rotated Sorted Array
A

https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. Find Minimum in Rotated Sorted Array II
A

https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Minimum Absolute Sum Difference
A

https://leetcode.com/problems/minimum-absolute-sum-difference/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. Minimum Size Subarray Sum
A

https://leetcode.com/problems/minimum-size-subarray-sum/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. Shortest Subarray with Sum at Least K
A

https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/

17
Q
  1. Distinct Numbers in Each Subarray
A

https://leetcode.com/problems/distinct-numbers-in-each-subarray/

18
Q
  1. Maximum Subarray
A

https://leetcode.com/problems/maximum-subarray/