Learn More

Try out the world’s first micro-repo!

Learn More

Snippetizing your Coding Interviews

Snippetizing your Coding Interviews


Working for FAANG companies is every developer's dream. If you are wondering about how to get a job at FAANG or how to boost your preparation, this article consists of some really useful tips that have helped developers crack their interviews at FAANG. Preparation for DSA and approaching your interviews using these tips could land you in your dream role. Practicing DSA is a crucial task in the process, but can be made much more efficient using code snippets. Pieces is a useful snippet-saving tool to help developers to save time and effort by saving their templates, important algorithms, and solutions as snippets in <1 second, making search quite easy. Hence, it is an amazing tool for developers who want to boost their FAANG preparation.

Ridiculously high salaries, beautiful offices and free meals (yes, people used to go offices and maybe one day we will again), bragging rights for your parents....it's no surprise that there's an intense competition for top developer jobs during placements.

I'm Anushka from Pieces, and I work with developers on how to leverage tools and workflow to be more productive.  But before Pieces, I had my 15 minutes of fame for a post I wrote on job interview tips for younger developers that made it to the list of Top 10 trending repositories on Github worldwide.

Clearly the topic struck a nerve, so today I'm following up with part 2 on how to nail the coding interview and bag your dream offer from FAANG or that hot Web3 startup.

DSA is the key to a successful interview

While there are a lot of areas you will be evaluated on at FAANG companies, let's be clear about one thing - you need to crush the DSA interview. Never heard of DSA? Let’s understand what it is and what makes it a relevant topic for your interviews

DSA stands for data structures and algorithms. A data structure is a method of organizing data for efficient use, like sequences or data tables, whereas algorithms are the steps or procedures for solving a well-defined problem. They are the dynamic underlying parts that interact with data structures and help create well-optimized and efficient software.

Interviewers are looking for students who understand data structures like hash tables, trees, graphs, and various algorithms and who can apply the right set of tools to solve a given problem efficiently. If you know DSA well, you'll be better equipped to decide on the most efficient data structure to solve a problem.

What makes DSA so critical during FAANG interviews is that it provides the interviewer a simple approach to evaluate your problem-solving skills, coding skills, basic computer science knowledge and clarity of thought.

DSA helps in understanding the nature of the problem at a deeper level and thereby a better understanding of the world, making it a beloved topic for coding interviews.

Smash your upcoming interviews!

OK, so now you know what the DSA is and how it might feel like.  How can you prepare for and crush these interviews?

Speed up your practice to learn faster

Saving templates of your most-used data structures and algorithms as code snippets is one of the best ideas to speed up your learning. Use a modern code snippet tool like Pieces to keep templates ready with your common algorithms, operations on the data structure, macros and common imports. You'll save time that you otherwise would have spent writing code from scratch, and you can repurpose that time to focus on logic building.

Finding the critical topics to study right before your interview is painful. You'll likely visit a ton of sites and webpages, and it's hard to keep track of the valuable material. Snippets can be invaluable to better organize this research and prep, and your saved snippets are easily accessible to brush over before a coding test. So if you need to do a DFS (depth-first search) ever again (or any other code), you'll have already saved it.

Pick up a language you are confident with

Most interviewers will ask you to choose any language, but you need to choose wisely. Select a single language and practice DSA entirely with it.  Switching between different languages will hurt your preparation.

Talk through your solution

It never hurts to ask if you can start your implementation in pseudocode. Interviewers are keen on understanding your thought process and are likely less concerned with your ability to use proper syntax on a whiteboard.

Always start from the brute force approach

While solving questions, always make it a habit to start off with the solution with the worst time complexity. Talk the interviewer through your approach and then think of how you can improvise further to make it efficient using better approaches. For example, you can start with a solution with O(n^2) time complexity and then come to O(n) and then O(log(n)) if possible. It's better to save all the different approaches as separate snippets so that you can find them later.

The Power of the Code Snippet

Really though, we're just scratching the surface on how using a snippet management tool like Pieces can turbo-charge your preparation for these interviews. Let's dig deeper.

Saving Time

Whenever starting with a new problem, there's a lot of code that you might have used previously that is insignificant for logic-building. Think of macros, boilerplate, templates, libraries, or standard algorithms.  You need them in almost every problem, but you're wasting your time rewriting them every time.

Instead, use snippets to save and reuse this sort of code.  You'll only need to worry about how to reduce the time and space complexities of your solution, rather than spending most of your time writing repetitive code.

For example, if you're trying to use binary search, why waste time writing the same old template for the 100th time when you could be spending that precious time determining the best approach and then optimizing that approach? Save that template as a snippet!

Staying Organized

Another issue you might have faced is remembering all the important topics that you need to brush up on before your interviews. A hot tip for this is to save important algorithms and solutions as snippets. So whenever I finish practicing and plan to revise, I already have my saved collection of snippets of important concepts in one place that I can visit anytime.

Maintain Your Flow

You're going to prepare a lot for these interviews, and when you get into that zone when the distractions drop away and you start cranking, the last thing you want is to break your flow.

Pieces is designed with this flow state in mind. You can save snippets in literally less than a second straight from your IDE or browser, without even having the Pieces app open.  There's no need to name the snippet, format it, put it into a folder.  The snippets are auto-formatted, tagged and searchable, which makes it a no-brainer to save snippets there.

Get rolling with Pieces

It's completely free to get started with Pieces, with absolutely no questions asked! You don't need to enter any personal information to start using it.

Download Pieces here and boost your preparation for upcoming interviews.

Don’t forget to install our IntelliJ, VS Code, and/or Chrome integrations here to enable all the single-click saving!

Interested in becoming a Pieces Content Partner?

Learn More

Get our latest blog posts and product updates by signing up for our monthly newsletter! 

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Table of Contents

No items found.
More from Pieces