Coding interview preparation
5.8K subscribers
375 photos
56 files
163 links
Download Telegram
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.
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.
Collections in java
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.
Java HashMap vs TreeMap vs LinkedHashMap
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
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
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
Hidden Python Features for Beginners

1
. Merge Dictionaries

>>> d1 = {"a":1, "b": 2}
>>> d2 = {"c":3, "d":4}
>>> dict(d1, **d2)
{’a’: 1, 'b’: 2, 'c’: 3, 'd’: 4}
>>> {**d1, **d2}
{’a’: 1, 'b’: 2, 'c’: 3, 'd’: 4}
👍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.’
Data structures playlist
by WilliamFiset
🎬 14 video lessons
9 hours worth of material
🔗 Courses link
Most popular backend frameworks 2020
What's the Interview Process Like, In a Nutshell?

If I were asked to summarize all the resources above to you, here's what I would share:

🔹 I would say that you typically get between 30 minutes to an hour to solve a coding question.
🔹 You typically get a choice of programming language like C++, Python, Java, or JavaScript, but not always...in some instances you do not have a choice.
🔹 Outside of the coding portion, they are free to ask you pretty much anything, from language-specific questions to favorite projects, but any interview with a coding portion tends to be dominated by it.

And here's some general advice to consider: you are going to be dealing with people who may be pretty tired of interviews. Smile if you can. Try to show enthusiasm. Have a conversation, and try to talk to the interviewer the way you might communicate if the two of you were pair programming, but they were more senior.
General tips

Always validate input first. Check for inputs that are invalid, empty, negative, or different. Never assume you are given the valid parameters. Alternatively, clarify with the interviewer whether you can assume valid input (usually yes), which can save you time from writing code that does input validation.

Are there any time and space complexities requirements or constraints?

Check for off-by-one errors.

In languages where there are no automatic type coercion, check that concatenation of values are of the same type: int,str, and list.

After you finish your code, use a few example inputs to test your solution.

Is the algorithm supposed to run multiple times, perhaps on a web server? If yes, the input can likely be pre-processed to improve the efficiency in each API call.

Use a mix of functional and imperative programming paradigms:

🔹 Write pure functions as often as possible.
🔹 Use pure functions because they are easier to reason with and can help reduce bugs in your implementation.
🔹 Avoid mutating the parameters passed into your function, especially if they are passed by reference, unless you are sure of what you are doing.
🔹 Achieve a balance between accuracy and efficiency. Use the right amount of functional and imperative code where appropriate. Functional programming is usually expensive in terms of space complexity because of non-mutation and the repeated allocation of new objects. On the other hand, imperative code is faster because you operate on existing objects.
🔹 Avoid relying on mutating global variables. Global variables introduce state.
🔹 Make sure that you do not accidentally mutate global variables, especially if you have to rely on them.
Distribution of the types of problems that were generally encountered in an Apple interview.