Skip to content

Commit 78a69b3

Browse files
committed
readme
1 parent 76969bf commit 78a69b3

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ One problem a day.
33
This repo will contains the answers.
44
I'm timing only the first solve
55

6+
---
7+
68
## 1
79
> This problem was asked by Uber
810
@@ -16,6 +18,7 @@ Follow-up: what if you can't use division?
1618

1719
[JS](pb1/answer.js) (6:18, Bonus 2:34)
1820

21+
---
1922

2023
## 2
2124
>This problem was recently asked by Google.
@@ -30,6 +33,7 @@ Bonus: Can you do this in one pass?
3033

3134
[JS](pb2/answer.js) (3:34)
3235

36+
---
3337

3438
## 3
3539
>This problem was recently asked by Google.
@@ -55,6 +59,7 @@ assert deserialize(serialize(node)).left.left.val == 'left.left'
5559

5660
[Python](pb3/answer.py) (Not timed)
5761

62+
---
5863

5964
## 4
6065
>This problem was asked by Stripe.
@@ -67,6 +72,8 @@ You can modify the input array in-place.
6772

6873
[JS](pb4/answer.js) (3:47)
6974

75+
---
76+
7077
## 5
7178
> This problem was asked by Jane Street.
7279
@@ -86,12 +93,15 @@ Implement car and cdr.
8693

8794
[JS](pb5/answer.js) (Not timed)
8895

96+
---
97+
8998
## 6
9099
> This problem was asked by Google.
91100
92101
An XOR linked list is a more memory efficient doubly linked list. Instead of each node holding `next` and `prev` fields, it holds a field named both, which is an XOR of the next node and the previous node. Implement an XOR linked list; it has an `add(element)` which adds the element to the end, and a `get(index)` which returns the node at index.
93102
If using a language that has no pointers (such as Python), you can assume you have access to get_pointer and dereference_pointer functions that converts between nodes and memory addresses.
94103

104+
---
95105

96106
### 7
97107
> This problem was asked by Facebook.
@@ -105,6 +115,8 @@ You can assume that the messages are decodable. For example, '001' is not allowe
105115

106116
[JS](pb7/answer.js) (Not timed, very long)
107117

118+
---
119+
108120
### 8
109121
> This problem was asked by Google.
110122
@@ -125,3 +137,24 @@ For example, the following tree has 5 unival subtrees:
125137
## Solution
126138

127139
[JS](pb8/answer.js) (Not timed)
140+
141+
---
142+
143+
### 9
144+
145+
> This problem was asked by Airbnb.
146+
147+
Given a list of integers, write a function that returns the largest sum of non-adjacent numbers. Numbers can be 0 or negative.
148+
For example, `[2, 4, 6, 2, 5]` should return `13`, since we pick 2, 6, and 5. `[5, 1, 1, 5]` should return `10`, since we pick 5 and 5.
149+
Follow-up: Can you do this in O(N) time and constant space?
150+
151+
---
152+
153+
### 10
154+
> This problem was asked by Apple.
155+
156+
Implement a job scheduler which takes in a function f and an integer n, and calls f after n milliseconds.
157+
158+
## Solution
159+
[Python](pb10/answer.py) (1:17)
160+
[JS](pb10/answer.js) (Trivial)

0 commit comments

Comments
 (0)