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
You'll be guiding your partner through the coding problem on the right side of your screen.
11
+
12
+
⚠️ **Please do not share this URL / problem before class.**
13
+
Revealing the question early defeats the purpose of simulating a real-world interview, where candidates do not know the problem in advance. Let's give your partner the chance to experience the challenge authentically.
14
+
15
+
🧠 **Before class:**
16
+
Take time to study the problem. During the session, you'll have 90 minutes in your breakout room to run a mock interview with your partner. Be sure to take turns acting as the interviewer and interviewee.
17
+
18
+
🗣️ **As the interviewer, your responsibilities are:**
19
+
- Send this URL to your partner (copy and past the whole url and slack it directly to you partner)
20
+
- Briefly introduce the problem
21
+
- Never give away the answer
22
+
- Take notes and provide feedback
23
+
- Fill out this [solving guide](https://docs.google.com/forms/d/e/1FAIpQLSfKHRJlZSUR-lKnQgfIWhe5GzM1CcMmO6Lf8ECvAY8DsFh1FA/viewform)
24
+
25
+
🗣️ **As the interviewee, your responsibilities are:**
26
+
- Ask clarifying questions
27
+
- Follow the steps in the [solving guide](https://docs.google.com/forms/d/e/1FAIpQLSfKHRJlZSUR-lKnQgfIWhe5GzM1CcMmO6Lf8ECvAY8DsFh1FA/viewform):
28
+
Step 1: Clarify
29
+
Step 2: Plan
30
+
Step 3: Implement
31
+
Step 4: Test
32
+
Step 5: Optimize
33
+
34
+
🪞 **After the first interview:**
35
+
Leave 10–15 minutes to reflect, share feedback, and then switch roles.
36
+
37
+
Best of luck, and enjoy the practice! 🚀
38
+
## Problem: Two Sum
39
+
40
+
Given an array of integers \`nums\` and an integer \`target\`, return indices of the two numbers such that they add up to target.
41
+
42
+
You may assume that each input would have exactly one solution, and you may not use the same element twice.
43
+
44
+
You can return the answer in any order.
45
+
46
+
**Note:** Values can be duplicated, you can short circuit, and it's guaranteed to have a solution.
47
+
48
+
### Examples:
49
+
50
+
**Example 1:**
51
+
- Input: nums = [2,7,11,15], target = 9
52
+
- Output: [0,1]
53
+
- Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].
54
+
55
+
**Example 2:**
56
+
- Input: nums = [3,2,4], target = 6
57
+
- Output: [1,2]
58
+
59
+
**Example 3:**
60
+
- Input: nums = [3,3], target = 6
61
+
- Output: [0,1]
62
+
63
+
### Follow-up Questions:
64
+
- What is the time and space complexity of your solution?
65
+
- How would you optimize this if the array was sorted?
66
+
- What if we needed to find all pairs that sum to the target?
67
+
`,
68
+
exercises: [{
69
+
starterCode:`
70
+
/*
71
+
Problem: Two Sum
72
+
73
+
Given an array of integers nums and an integer target,
74
+
return indices of the two numbers such that they add up to target.
75
+
76
+
You may assume that each input would have exactly one solution,
77
+
and you may not use the same element twice.
78
+
79
+
You can return the answer in any order.
80
+
*/
81
+
function twoSum(nums, target) {
82
+
// Your code here
83
+
}`,
84
+
solution:`
85
+
/*
86
+
Problem: Two Sum
87
+
88
+
Given an array of integers nums and an integer target,
89
+
return indices of the two numbers such that they add up to target.
90
+
91
+
You may assume that each input would have exactly one solution,
92
+
and you may not use the same element twice.
93
+
94
+
You can return the answer in any order.
95
+
*/
96
+
function twoSum(nums, target) {
97
+
const map = new Map();
98
+
99
+
for (let i = 0; i < nums.length; i++) {
100
+
const complement = target - nums[i];
101
+
102
+
if (map.has(complement)) {
103
+
return [map.get(complement), i];
104
+
}
105
+
106
+
map.set(nums[i], i);
107
+
}
108
+
109
+
// This should never be reached given the problem constraints
questionJsx: <p>Your company is hiring four software development engineers from a pool of 12 candidates. The order in which the candidates are hired has no effect. How many distinct groups of four SDEs are there?</p>,
7
+
answers: [
8
+
"495",
9
+
"11,880",
10
+
"24",
11
+
"12"
12
+
],
13
+
correctAnswer: 0
14
+
},
15
+
{
16
+
type: QUESTION_TYPES.RADIO,
17
+
questionJsx: <p>You have an office with four unique walls ordered by N-S-E-W. You have enough room to hang 4 paintings, one on each wall. If you have 6 paintings to choose from, how many arrangements are there to hang the 4 paintings?</p>,
18
+
answers: [
19
+
"24",
20
+
"15",
21
+
"360",
22
+
"6"
23
+
],
24
+
correctAnswer: 2
25
+
},
26
+
{
27
+
type: QUESTION_TYPES.RADIO,
28
+
questionJsx: <p>Which of the following statements accurately describes combinations?</p>,
29
+
answers: [
30
+
"Combinations are groupings of items in which the order of the grouping matters.",
31
+
"Combinations are groupings of items in which the order of the grouping does not matter.",
32
+
"Combinations are the number of ways to arrange a certain number of objects.",
33
+
"Combinations are calculated by multiplying the number of available possibilities."
34
+
],
35
+
correctAnswer: 1
36
+
},
37
+
{
38
+
type: QUESTION_TYPES.RADIO,
39
+
questionJsx: <p>Your company issues each employee a five-letter ID code. The code is composed of the letters A, B, C, D, E, F, G, and H. The same letter cannot appear twice in a single ID code. How many unique three-letter ID codes are there?</p>,
40
+
answers: [
41
+
"56",
42
+
"512",
43
+
"40,320",
44
+
"336",
45
+
],
46
+
correctAnswer: 3
47
+
},
48
+
{
49
+
type: QUESTION_TYPES.RADIO,
50
+
questionJsx: <p>Given a list of 9 elements, how many combinations of 5 are there?</p>,
51
+
answers: [
52
+
"120",
53
+
"15,120",
54
+
"59,049",
55
+
"126",
56
+
],
57
+
correctAnswer: 3
58
+
},
59
+
{
60
+
type: QUESTION_TYPES.RADIO,
61
+
questionJsx: <p>Which of the following statements accurately describes permutations?</p>,
62
+
answers: [
63
+
"Permutations are groupings of items in which the order does not matter.",
64
+
"Permutations are groupings of items in which the order matters",
65
+
"There are generally more combinations than permutations for the same data set.",
66
+
"Permutations are calculated by adding up all the elements in a data set."
67
+
],
68
+
correctAnswer: 1
69
+
}
70
+
];
71
+
72
+
exportdefault{
73
+
id: 'c9d3a5b8',
74
+
title: 'Combinations and Permutations Quiz',
75
+
sectionId: 'just-enough-math',
76
+
previousChapterId: null,
77
+
content: `Test your understanding of combinations, permutations, and their applications in organizing and counting data.`,
questionJsx: <p>Which of the following statements describes the difference between the following expressions: 4³ = 64 and log₄64 = 3?</p>,
7
+
answers: [
8
+
"4³ = 64 is an exponential function and log₄64 = 3 is a logarithmic function.",
9
+
"4³ = 64 and log₄64 = 3 are both exponential functions.",
10
+
"4³ = 64 and log₄64 = 3 are both logarithmic functions.",
11
+
"4³ = 64 and log₄64 = 3 are both linear functions."
12
+
],
13
+
correctAnswer: 0
14
+
},
15
+
{
16
+
type: QUESTION_TYPES.RADIO,
17
+
questionJsx: <p>Which of the following expressions is equivalent to the exponent 5² = 25?</p>,
18
+
answers: [
19
+
"log₅25 = 2",
20
+
"log₂₅5 = 2",
21
+
"log₂25 = 5",
22
+
"log₅2 = 25"
23
+
],
24
+
correctAnswer: 0
25
+
},
26
+
{
27
+
type: QUESTION_TYPES.RADIO,
28
+
questionJsx: <p>Which of the following expressions is equivalent to the logarithm log₂8 = 3?</p>,
29
+
answers: [
30
+
"2³ = 8",
31
+
"3² = 8",
32
+
"8² = 3",
33
+
"2⁸ = 3"
34
+
],
35
+
correctAnswer: 0
36
+
},
37
+
{
38
+
type: QUESTION_TYPES.RADIO,
39
+
questionJsx: <p>Suppose a company has a website tracker to see how much traffic comes to their website. Due to a bug in the software, traffic is added that is not real. The company knows that they have an average 10 visits per day, but the website tracker observes 100 visits the second day, 1,000 visits the third day, 10,000 visits the fourth day, and so on. What statement accurately describes the growth rate of the buggy tracker?</p>,
40
+
answers: [
41
+
"The traffic grows logarithmically.",
42
+
"The traffic grows exponentially at first, then logarithmically.",
43
+
"The traffic grows exponentially.",
44
+
"The traffic grows logarithmically at first, then exponentially."
45
+
],
46
+
correctAnswer: 2
47
+
},
48
+
{
49
+
type: QUESTION_TYPES.RADIO,
50
+
questionJsx: <p>Which of the following statements is correct regarding the relationship in growth rates of exponents and logarithms?</p>,
51
+
answers: [
52
+
"Logarithms grow at a much faster rate than exponents.",
53
+
"Exponents and logarithms grow at a similar rate",
54
+
"It differs and must be calculated on a case-by-case basis.",
55
+
"Exponents grow at a much faster rate than logarithms.",
56
+
],
57
+
correctAnswer: 3
58
+
},
59
+
{
60
+
type: QUESTION_TYPES.RADIO,
61
+
questionJsx: <p>Which of the following logarithms is equivalent to the expression x² = 10?</p>,
62
+
answers: [
63
+
"log₁₀x = 2",
64
+
"logₓ10 = 2",
65
+
"log₂x = 10",
66
+
"log₁₀2 = x"
67
+
],
68
+
correctAnswer: 1
69
+
}
70
+
];
71
+
72
+
exportdefault{
73
+
id: 'e8b4f1a7',
74
+
title: 'Exponents and Logarithms Quiz',
75
+
sectionId: 'just-enough-math',
76
+
previousChapterId: null,
77
+
content: `Test your understanding of exponents, logarithms, and their role in algorithm efficiency.`,
0 commit comments