Skip to content

Commit 4e69ae7

Browse files
committed
m
1 parent 527fb87 commit 4e69ae7

11 files changed

+364
-578
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# On-Site Question 1 \n",
8+
"___\n",
9+
"\n",
10+
"## Question\n",
11+
"** Given a dice which rolls 1 to 7 (with uniform probability), simulate a 5 sided dice. Preferably, write your solution as a function. **\n",
12+
"\n",
13+
"## Requirements\n",
14+
"\n",
15+
"** You MUST do this on pen and paper or on a whiteboard. No actual coding is allowed until you've solved it on pen and paper! **"
16+
]
17+
},
18+
{
19+
"cell_type": "markdown",
20+
"metadata": {},
21+
"source": [
22+
"___"
23+
]
24+
},
25+
{
26+
"cell_type": "markdown",
27+
"metadata": {},
28+
"source": [
29+
"# Good Luck!"
30+
]
31+
}
32+
],
33+
"metadata": {
34+
"kernelspec": {
35+
"display_name": "Python 2",
36+
"language": "python",
37+
"name": "python2"
38+
},
39+
"language_info": {
40+
"codemirror_mode": {
41+
"name": "ipython",
42+
"version": 2
43+
},
44+
"file_extension": ".py",
45+
"mimetype": "text/x-python",
46+
"name": "python",
47+
"nbconvert_exporter": "python",
48+
"pygments_lexer": "ipython2",
49+
"version": "2.7.11"
50+
}
51+
},
52+
"nbformat": 4,
53+
"nbformat_minor": 0
54+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# On-Site Question 2 \n",
8+
"___\n",
9+
"\n",
10+
"## Question\n",
11+
"** Given a dice which rolls from 1 to 5, simulate a uniform 7 sided dice! **\n",
12+
"\n",
13+
"## Requirements\n",
14+
"\n",
15+
"** You MUST do this on pen and paper or on a whiteboard. No actual coding is allowed until you've come up with a solution by hand! **"
16+
]
17+
},
18+
{
19+
"cell_type": "markdown",
20+
"metadata": {},
21+
"source": [
22+
"___"
23+
]
24+
},
25+
{
26+
"cell_type": "markdown",
27+
"metadata": {},
28+
"source": [
29+
"# Good Luck!"
30+
]
31+
}
32+
],
33+
"metadata": {
34+
"kernelspec": {
35+
"display_name": "Python 2",
36+
"language": "python",
37+
"name": "python2"
38+
},
39+
"language_info": {
40+
"codemirror_mode": {
41+
"name": "ipython",
42+
"version": 2
43+
},
44+
"file_extension": ".py",
45+
"mimetype": "text/x-python",
46+
"name": "python",
47+
"nbconvert_exporter": "python",
48+
"pygments_lexer": "ipython2",
49+
"version": "2.7.11"
50+
}
51+
},
52+
"nbformat": 4,
53+
"nbformat_minor": 0
54+
}
Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# On-Site Question 3 - SOLUTION\n",
7+
"# On-Site Question 3 \n",
88
"\n",
99
"## Question\n",
1010
"\n",
@@ -26,44 +26,7 @@
2626
"cell_type": "markdown",
2727
"metadata": {},
2828
"source": [
29-
"# SOLUTION\n",
30-
"\n",
31-
"Hopefully you remember this problem, you've already seen it! The solution is:"
32-
]
33-
},
34-
{
35-
"cell_type": "code",
36-
"execution_count": 1,
37-
"metadata": {
38-
"collapsed": true
39-
},
40-
"outputs": [],
41-
"source": [
42-
"def reverse(s):\n",
43-
" \n",
44-
" # Base Case\n",
45-
" if len(s) <= 1:\n",
46-
" return s\n",
47-
"\n",
48-
" # Recursion\n",
49-
" return reverse(s[1:]) + s[0]"
50-
]
51-
},
52-
{
53-
"cell_type": "markdown",
54-
"metadata": {},
55-
"source": [
56-
"___\n",
57-
"## Notes\n",
58-
"\n",
59-
"Remember when recursion questions arise, think about the base case and the recursive case. Review the recusion section of the course for review for this problem."
60-
]
61-
},
62-
{
63-
"cell_type": "markdown",
64-
"metadata": {},
65-
"source": [
66-
"# Good Job!"
29+
"# Good Luck!"
6730
]
6831
}
6932
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# On-Site Question 4 \n",
8+
"\n",
9+
"## Question\n",
10+
"**Find the squareroot of a given number rounded down to the nearest integer, without using the sqrt function. For example, squareroot of a number between [9, 15] should return 3, and [16, 24] should be 4.**\n",
11+
"\n",
12+
"## Requirements\n",
13+
"\n",
14+
"** Feel free to code this out (but its recommended that you use paper/pencil or whiteboard)**"
15+
]
16+
},
17+
{
18+
"cell_type": "markdown",
19+
"metadata": {},
20+
"source": [
21+
"# Good Luck!"
22+
]
23+
}
24+
],
25+
"metadata": {
26+
"kernelspec": {
27+
"display_name": "Python 2",
28+
"language": "python",
29+
"name": "python2"
30+
},
31+
"language_info": {
32+
"codemirror_mode": {
33+
"name": "ipython",
34+
"version": 2
35+
},
36+
"file_extension": ".py",
37+
"mimetype": "text/x-python",
38+
"name": "python",
39+
"nbconvert_exporter": "python",
40+
"pygments_lexer": "ipython2",
41+
"version": "2.7.11"
42+
}
43+
},
44+
"nbformat": 4,
45+
"nbformat_minor": 0
46+
}

Mock Interviews/Large Search Engine Company /Search Engine Company - Interview Problems/On-Site Question 1 - SOLUTION.ipynb

Lines changed: 0 additions & 127 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# On-Site Question 1 \n",
8+
"___\n",
9+
"\n",
10+
"## Question\n",
11+
"** Given a dice which rolls 1 to 7 (with uniform probability), simulate a 5 sided dice. Preferably, write your solution as a function. **\n",
12+
"\n",
13+
"## Requirements\n",
14+
"\n",
15+
"** You MUST do this on pen and paper or on a whiteboard. No actual coding is allowed until you've solved it on pen and paper! **"
16+
]
17+
},
18+
{
19+
"cell_type": "markdown",
20+
"metadata": {},
21+
"source": [
22+
"___"
23+
]
24+
},
25+
{
26+
"cell_type": "markdown",
27+
"metadata": {},
28+
"source": [
29+
"# Good Luck!"
30+
]
31+
}
32+
],
33+
"metadata": {
34+
"kernelspec": {
35+
"display_name": "Python 2",
36+
"language": "python",
37+
"name": "python2"
38+
},
39+
"language_info": {
40+
"codemirror_mode": {
41+
"name": "ipython",
42+
"version": 2
43+
},
44+
"file_extension": ".py",
45+
"mimetype": "text/x-python",
46+
"name": "python",
47+
"nbconvert_exporter": "python",
48+
"pygments_lexer": "ipython2",
49+
"version": "2.7.11"
50+
}
51+
},
52+
"nbformat": 4,
53+
"nbformat_minor": 0
54+
}

0 commit comments

Comments
 (0)