a
a
aizatto.com
Build.my
GitHub
Linkedin
Notion
Search…
aizatto.com
Table of Contents
Portfolio, Projects, Tools, Toys
Interview Guide
Choosing A Company
Job Boards
Practice
Technical Interview Cheatsheet
Interview Process
Questions to Ask
Coding
Soft Skills
Rejection
Negotiation / Deciding
Accepting, Joining
FAQ
Engineering Code
Engineering Management
Why GitBook?
Getting into Tech
Personal Goals
Daily Drivers
Contacting Me
Notes
AWS
JavaScript
Node.js
Software Engineering
Technical Due Diligence
Web Development
Archive
More on Notion
Powered By
GitBook
Coding
Example Question:
Make assumptions
If they tell you are taking input from STDIN, start by just taking input from a string.
Write example cases as comments, or part of the code execution. This gives discussion points.
Explain assumptions about validity of input
Create an
assert
function, which takes in the
expected
result given an
input
. See
PHP
or
JS
​
1
input
=
"a b c d e"
;
2
​
3
main
(
input
)
{
4
...
5
}
6
​
7
assert
(
expected
,
input
)
{
8
console
.
log
(
input
);
9
actual
=
main
(
input
);
10
result
=
expected
===
actual
;
11
console
.
log
(
result
);
12
if
(
!
result
)
{
13
console
.
log
(
actual
);
14
console
.
log
(
expected
);
15
}
16
}
17
​
18
// Case 1
19
assert
(
expected
,
input
);
20
​
21
// Case 2
22
assert
(
expected2
,
input2
);
23
​
24
// Case 3
25
assert
(
expected3
,
input3
);
Copied!
​
Previous
Questions to Ask
Next
Soft Skills
Last modified
3yr ago
Copy link
Contents