-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestions.py
More file actions
18 lines (10 loc) · 1.04 KB
/
Questions.py
File metadata and controls
18 lines (10 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
1. Given a string representing a phrase e.g. om is in Austin, reverse each word with the location of the world being in the same place e.g. moT si ni nitsuA",
2. What other companies are you applying to, and why are you applying to them?
3. Pairs with Specific Difference: Given an array arr of distinct integers and a nonnegative integer k, write a function findPairsWithGivenDifference that returns an array of all pairs [x,y] in arr, such that x - y = k. If no such pairs exist, return an empty array.
input: arr = [0, -1, -2, 2, 1], k = 1
output: [[0, -1], [-1, -2], [2, 1], [1, 0]]
input: arr = [1, 7, 5, 3, 32, 17, 12], k = 17
output: []
4. What is all of the HTTP response status codes?
5. Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.
Note: You may not slant the container and n is at least 2.