🏆 Top results in the quiz 'Programming basics'
🖊 8 questions
⏱ 15 seconds per question
🤓 56 people took the quiz
🥇 Alpha1Beta2Tgeta3 – 8 (29.6 sec)
🥈 @Hmmm00 – 8 (33.2 sec)
🥉 @Subhanshu20135 – 8 (39 sec)
4. @Gfwfg – 8 (43.3 sec)
5. Sticker – 8 (49.6 sec)
6. @drago32123 – 8 (52.4 sec)
7. @sawyer_09 – 8 (55.1 sec)
8. PEE NA – 8 (1 min 16 sec)
9. Peter Ragnick – 7 (30.4 sec)
10. @Eraqus1 – 7 (36.6 sec)
11. @engineer951999 – 7 (45.1 sec)
12. @robleisrajkumar – 7 (47 sec)
13. @DeadSk0ll – 7 (51.6 sec)
14. Anonymous – 7 (57.9 sec)
15. Malik Hr – 7 (1 min 2 sec)
16. RAMYA NALLIBOINA – 7 (54.3 sec)
17. Mowli Dharan – 7 (1 min 3 sec)
18. @WiesmanY – 7 (59.1 sec)
19. @puni27 – 7 (1 min 3 sec)
20. Vaibhav Joshi – 6 (39.8 sec)
🖊 8 questions
⏱ 15 seconds per question
🤓 56 people took the quiz
🥇 Alpha1Beta2Tgeta3 – 8 (29.6 sec)
🥈 @Hmmm00 – 8 (33.2 sec)
🥉 @Subhanshu20135 – 8 (39 sec)
4. @Gfwfg – 8 (43.3 sec)
5. Sticker – 8 (49.6 sec)
6. @drago32123 – 8 (52.4 sec)
7. @sawyer_09 – 8 (55.1 sec)
8. PEE NA – 8 (1 min 16 sec)
9. Peter Ragnick – 7 (30.4 sec)
10. @Eraqus1 – 7 (36.6 sec)
11. @engineer951999 – 7 (45.1 sec)
12. @robleisrajkumar – 7 (47 sec)
13. @DeadSk0ll – 7 (51.6 sec)
14. Anonymous – 7 (57.9 sec)
15. Malik Hr – 7 (1 min 2 sec)
16. RAMYA NALLIBOINA – 7 (54.3 sec)
17. Mowli Dharan – 7 (1 min 3 sec)
18. @WiesmanY – 7 (59.1 sec)
19. @puni27 – 7 (1 min 3 sec)
20. Vaibhav Joshi – 6 (39.8 sec)
We shared only top 20 so those who didn't do so great don't feel bad about their name positioning too low. Do you want to start a league? Every day or every few days we would have new quizzes where you can get points for final rankings!
Anonymous Poll
90%
Yes
10%
No
Data Structures series
Linked List
🔹 A Linked List is a linear collection of data elements, called nodes, each pointing to the next node by means of a pointer. It is a data structure consisting of a group of nodes which together represent a sequence.
🔹 Singly-linked list: linked list in which each node points to the next node and the last node points to null
Doubly-linked list: linked list in which each node has two pointers, p and n, such that p points to the previous node and n points to the next node; the last node's n pointer points to null
🔹 Circular-linked list: linked list in which each node points to the next node and the last node points back to the first node
🔹 Time Complexity:
Linked List
🔹 A Linked List is a linear collection of data elements, called nodes, each pointing to the next node by means of a pointer. It is a data structure consisting of a group of nodes which together represent a sequence.
🔹 Singly-linked list: linked list in which each node points to the next node and the last node points to null
Doubly-linked list: linked list in which each node has two pointers, p and n, such that p points to the previous node and n points to the next node; the last node's n pointer points to null
🔹 Circular-linked list: linked list in which each node points to the next node and the last node points back to the first node
🔹 Time Complexity:
Access: O(n)
Search: O(n)
Insert: O(1)
Remove: O(1)
👍1
What not to do during an interview
Don’t suck at something you say you’re an expert at
Seriously, how often do I talk to Java experts who don’t know how to use the most basic java.util classes? Or bash experts who don’t know how to grep? Or 3D math experts who don’t know anything about the dot and cross products? If you tell an interviewer you’re great at something she knows even a little bit about, she’s absolutely within her rights to test you on it. If you have no idea what she’s talking about, she’s going to start doubting everything on your resume. Don’t exaggerate your expertise.
Don’t make excuses for why you failed
Sometimes you get caught flat-footed, or your brain seizes up, or you have a bad day, or you go down the wrong path and get stuck. It happens, and a good interviewer gets that.
Don’t be arrogant, don’t act superior
Should be a no-brainer, right? And yet…
Don’t badmouth an old employer
Even if you worked for Satan in the helpdesk department of the third circle of hell, it’s unprofessional to trashtalk an old employer. Repeat after me: you had a great time and learned a lot, but it was time to move on.
Don’t swear
Don’t chatter on and on
You don’t want to be labelled a “talker”.
Don’t waste the interviewer’s (and your own) time
Don’t ask questions you can look up trivially. Don’t focus on irrelevant aspects of the job (gee, I hear you have catered lunches!).
Don’t get caught by an exploding offer
No company is going to give you an open-ended offer, valid until the end of time – but assuming your timetable is reasonable, most will be willing to hold on to an offer until you’re ready to make a decision (i.e., after you’ve finished your interviews).
Don’t get discouraged
The interview process is, to some degree, a stochastic process that can have little or no relationship to your actual abilities. Some interviewers and companies are better at it than others, but there isn’t a good way to know this ahead of time, and there isn’t much you could do about it, even if you did.
If you completely screw up with one interviewer, put it behind you and focus on acing the next. If you don’t get an offer, don’t take it as a statement on your personal worth. Take what you can from the experience, prepare the hell out of your next interview, and move on.
Don’t suck at something you say you’re an expert at
Seriously, how often do I talk to Java experts who don’t know how to use the most basic java.util classes? Or bash experts who don’t know how to grep? Or 3D math experts who don’t know anything about the dot and cross products? If you tell an interviewer you’re great at something she knows even a little bit about, she’s absolutely within her rights to test you on it. If you have no idea what she’s talking about, she’s going to start doubting everything on your resume. Don’t exaggerate your expertise.
Don’t make excuses for why you failed
Sometimes you get caught flat-footed, or your brain seizes up, or you have a bad day, or you go down the wrong path and get stuck. It happens, and a good interviewer gets that.
Don’t be arrogant, don’t act superior
Should be a no-brainer, right? And yet…
Don’t badmouth an old employer
Even if you worked for Satan in the helpdesk department of the third circle of hell, it’s unprofessional to trashtalk an old employer. Repeat after me: you had a great time and learned a lot, but it was time to move on.
Don’t swear
Don’t chatter on and on
You don’t want to be labelled a “talker”.
Don’t waste the interviewer’s (and your own) time
Don’t ask questions you can look up trivially. Don’t focus on irrelevant aspects of the job (gee, I hear you have catered lunches!).
Don’t get caught by an exploding offer
No company is going to give you an open-ended offer, valid until the end of time – but assuming your timetable is reasonable, most will be willing to hold on to an offer until you’re ready to make a decision (i.e., after you’ve finished your interviews).
Don’t get discouraged
The interview process is, to some degree, a stochastic process that can have little or no relationship to your actual abilities. Some interviewers and companies are better at it than others, but there isn’t a good way to know this ahead of time, and there isn’t much you could do about it, even if you did.
If you completely screw up with one interviewer, put it behind you and focus on acing the next. If you don’t get an offer, don’t take it as a statement on your personal worth. Take what you can from the experience, prepare the hell out of your next interview, and move on.
How long are coding interviews?
The phone screen portion of the coding interview typically lasts up to one hour. The second, more technical part of the interview can take multiple hours.
Where can I practice coding?
There are many ways to practice coding and prepare for your coding interview. LeetCode provides practice opportunities in more than 14 languages and more than 1,500 sample problems. Applicants can also practice their coding skills and interview prep with HackerRank.
How do I know if my coding interview went well?
There are a variety of indicators that your coding interview went well. These may include going over the allotted time, being introduced to additional team members, and receiving a quick response to your thank you email.
The phone screen portion of the coding interview typically lasts up to one hour. The second, more technical part of the interview can take multiple hours.
Where can I practice coding?
There are many ways to practice coding and prepare for your coding interview. LeetCode provides practice opportunities in more than 14 languages and more than 1,500 sample problems. Applicants can also practice their coding skills and interview prep with HackerRank.
How do I know if my coding interview went well?
There are a variety of indicators that your coding interview went well. These may include going over the allotted time, being introduced to additional team members, and receiving a quick response to your thank you email.
Don’t mistake the roles of your interviewers
There are generally three types of interviewers: HR, technical, and hiring managers. The HR representative is there to guide you through the process – meet you at reception, show you the coffee machine, give you a tour of the office, make sure the interviewers get to you on time, debrief you when all is done, and walk you out. Her involvement in the evaluation process will depend on the company, though she’ll almost certainly be watching for any HR-specific yellow or red flags.
Technical interviewers will make up the bulk of your interviewers. They’re there to determine if you have the technical chops for the job, and to decide whether you’re a good cultural fit. Some of them will be good interviewers, some bad. Some will have unconscious biases, others… will have stronger unconscious biases. Some will be in a good mood, others not. Some will be outgoing, others stoic. None will be able to tell you about your pay package, so don’t bother asking. It’s an unfortunate fact that your performance will likely be affected dramatically by who’s on the schedule the day you come in.
You’ll typically also meet the hiring manager at some point during the interview process. Some hiring managers will do technical interviews, some will focus on behavioral questions, and (if you’re doing well) some will focus mostly on selling you on the position. This is the person who will ultimately decide whether to fight for you – if you’re a questionable hire, she’s the one who can decide that you’re worth taking a chance on. If you’re an exceptional hire, she’s the one who’ll fight for a higher compensation package. A large part of her decision will be based upon feedback from the other interviewers, but ultimately she’s going to go by her gut.
There are generally three types of interviewers: HR, technical, and hiring managers. The HR representative is there to guide you through the process – meet you at reception, show you the coffee machine, give you a tour of the office, make sure the interviewers get to you on time, debrief you when all is done, and walk you out. Her involvement in the evaluation process will depend on the company, though she’ll almost certainly be watching for any HR-specific yellow or red flags.
Technical interviewers will make up the bulk of your interviewers. They’re there to determine if you have the technical chops for the job, and to decide whether you’re a good cultural fit. Some of them will be good interviewers, some bad. Some will have unconscious biases, others… will have stronger unconscious biases. Some will be in a good mood, others not. Some will be outgoing, others stoic. None will be able to tell you about your pay package, so don’t bother asking. It’s an unfortunate fact that your performance will likely be affected dramatically by who’s on the schedule the day you come in.
You’ll typically also meet the hiring manager at some point during the interview process. Some hiring managers will do technical interviews, some will focus on behavioral questions, and (if you’re doing well) some will focus mostly on selling you on the position. This is the person who will ultimately decide whether to fight for you – if you’re a questionable hire, she’s the one who can decide that you’re worth taking a chance on. If you’re an exceptional hire, she’s the one who’ll fight for a higher compensation package. A large part of her decision will be based upon feedback from the other interviewers, but ultimately she’s going to go by her gut.
How Long Should I Prepare for a Coding Interview?
Coding interview preparation time largely depends on the interviewee's level of experience. If you're an entry-level programmer, it's a good idea to spend at least twelve weeks preparing. If you have more experience, 4-8 weeks is suggested for interview prep.
Study the company's programming language and tools of choice. Practice a couple of coding challenges each day — don't let your practice be a cram session right before your coding interview. Finally, as you practice, make sure to time yourself to see how you are progressing.
Coding interview preparation time largely depends on the interviewee's level of experience. If you're an entry-level programmer, it's a good idea to spend at least twelve weeks preparing. If you have more experience, 4-8 weeks is suggested for interview prep.
Study the company's programming language and tools of choice. Practice a couple of coding challenges each day — don't let your practice be a cram session right before your coding interview. Finally, as you practice, make sure to time yourself to see how you are progressing.
How much time did you spend preparing for Google's interviews?
I spent six weeks preparing. Google was the only place I wanted to work. I had never used any real computer science constructs in my 30 years of work experience.
I got a whiteboard and markers and spent every day working on problems from Cracking the Code Interview. I solved the problems using C++ templates, to force myself to focus on the algorithms and notice what assumptions I was making about the underlying data types.
I had two weeks to prepare for the phone interview. After that I asked for a month to prepare for the on-site interviews.
Understand time/space complexity analysis. Know the time complexity of the basic data structures, especially hash tables. Learn to manage the space on the whiteboard. Think about where the computer will be repeating the same work twice, since that is probably where you can optimize.
The interviews are really not very hard. Don't panic.
p.s. I was hired.
Answer by
Bruce R. Miller
Google employee
I spent six weeks preparing. Google was the only place I wanted to work. I had never used any real computer science constructs in my 30 years of work experience.
I got a whiteboard and markers and spent every day working on problems from Cracking the Code Interview. I solved the problems using C++ templates, to force myself to focus on the algorithms and notice what assumptions I was making about the underlying data types.
I had two weeks to prepare for the phone interview. After that I asked for a month to prepare for the on-site interviews.
Understand time/space complexity analysis. Know the time complexity of the basic data structures, especially hash tables. Learn to manage the space on the whiteboard. Think about where the computer will be repeating the same work twice, since that is probably where you can optimize.
The interviews are really not very hard. Don't panic.
p.s. I was hired.
Answer by
Bruce R. Miller
Google employee
Why do programmers like using Java?
Java, in my opinion, is the most royal language that doesn’t suffer an inferiority complex, unlike most other languages.
Other languages feel they need to bend over backward and satisfy the needs of the lazy developers who want to write as short and ambiguous reserved language words and variable/method/class names as possible.
Other languages require a huge amount of mental mapping that has to happen in the developer’s head in order for the developer to read and “compile” the code in their head, because of the shortcuts they take.
Other languages allow the developers to shoot themselves in the foot, and as most developers are really bad at what they do, the amount of shot feet is unbearable.
Code is written once and read 10–1000 times. Java is verbose and prose-like and lets you focus on logical thinking, rather than mind-mapping.
Java is official, ceremonial, royal and with high self-esteem - it gets the job done and it gets the job done right. You adhere to Java’s strict rules and so many amazingly good practices, and Java won’t let you down.
Java doesn’t use heaps of illogical syntax sugars that you have to memorize by heart, which otherwise don’t make any sense.
Java is versatile in the regards to that it can run everywhere.
Java is the perfect object-oriented language, it predisposes the user to craft code using the design patterns, the SOLID principles, the clean code and clean architecture, which makes it great for serious business, it makes it great for education and many of the best books on software engineering are written in Java because of that.
Java has a great name, too.
Kaloyan Roussev
Android Developer
Java, in my opinion, is the most royal language that doesn’t suffer an inferiority complex, unlike most other languages.
Other languages feel they need to bend over backward and satisfy the needs of the lazy developers who want to write as short and ambiguous reserved language words and variable/method/class names as possible.
Other languages require a huge amount of mental mapping that has to happen in the developer’s head in order for the developer to read and “compile” the code in their head, because of the shortcuts they take.
Other languages allow the developers to shoot themselves in the foot, and as most developers are really bad at what they do, the amount of shot feet is unbearable.
Code is written once and read 10–1000 times. Java is verbose and prose-like and lets you focus on logical thinking, rather than mind-mapping.
Java is official, ceremonial, royal and with high self-esteem - it gets the job done and it gets the job done right. You adhere to Java’s strict rules and so many amazingly good practices, and Java won’t let you down.
Java doesn’t use heaps of illogical syntax sugars that you have to memorize by heart, which otherwise don’t make any sense.
Java is versatile in the regards to that it can run everywhere.
Java is the perfect object-oriented language, it predisposes the user to craft code using the design patterns, the SOLID principles, the clean code and clean architecture, which makes it great for serious business, it makes it great for education and many of the best books on software engineering are written in Java because of that.
Java has a great name, too.
Kaloyan Roussev
Android Developer
Best suited IDE's for programming languages:
1. JavaScript => VSCode
2. Python => PyCharm
3. C# => Visual Studio
4. Java => IntelliJ IDEA
5. Ruby => Ruby Mine
6. C & C++ => CLion
1. JavaScript => VSCode
2. Python => PyCharm
3. C# => Visual Studio
4. Java => IntelliJ IDEA
5. Ruby => Ruby Mine
6. C & C++ => CLion
👍1
Which programming language should I use on interview?
Companies usually let you choose, in which case you should use your most comfortable language. If you know a bunch of languages, prefer one that lets you express more with fewer characters and fewer lines of code, like Python or Ruby. It keeps your whiteboard cleaner.
Try to stick with the same language for the whole interview, but sometimes you might want to switch languages for a question. E.g., processing a file line by line will be far easier in Python than in C++.
Sometimes, though, your interviewer will do this thing where they have a pet question that’s, for example, C-specific. If you list C on your resume, they’ll ask it.
So keep that in mind! If you’re not confident with a language, make that clear on your resume. Put your less-strong languages under a header like ‘Working Knowledge.’
Companies usually let you choose, in which case you should use your most comfortable language. If you know a bunch of languages, prefer one that lets you express more with fewer characters and fewer lines of code, like Python or Ruby. It keeps your whiteboard cleaner.
Try to stick with the same language for the whole interview, but sometimes you might want to switch languages for a question. E.g., processing a file line by line will be far easier in Python than in C++.
Sometimes, though, your interviewer will do this thing where they have a pet question that’s, for example, C-specific. If you list C on your resume, they’ll ask it.
So keep that in mind! If you’re not confident with a language, make that clear on your resume. Put your less-strong languages under a header like ‘Working Knowledge.’
Advanced!
LeetCode list for each of the patterns. I found it pretty useful, feel free to make a copy of the list and use it.
2 Heaps
Arrays
Backtracking
Dynamic Programming
Fast & Slow pointers
Graph Traversal
In-place traversal of LL
K-way merge
Merge Intervals
Modified Binary Search
Sliding window
Top K elements
Topological Sorting
Tree BFS
Tree DFS
Two Pointers
Good Luck & Happy Coding!!
LeetCode list for each of the patterns. I found it pretty useful, feel free to make a copy of the list and use it.
2 Heaps
Arrays
Backtracking
Dynamic Programming
Fast & Slow pointers
Graph Traversal
In-place traversal of LL
K-way merge
Merge Intervals
Modified Binary Search
Sliding window
Top K elements
Topological Sorting
Tree BFS
Tree DFS
Two Pointers
Good Luck & Happy Coding!!
Leetcode
Favorite - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
👍1