Codementor Events

How to Pass Amazon Online Coding Test

Published May 07, 2020
How to Pass Amazon Online Coding Test

Introduction

Recently, I was able successfully to pass the Amazon Online Coding test. I was an amazing experience that pushed my mental strengths to the limit. In this blog, I am going to explain what did I do to successfully pass the test. Let's start with the test structure.

Test Structure

The purpose of the online coding test is to identify candidates who may do well on the onsite interview. It measures the problem solving skills and coding skills of the applicant. Also it has some questions to measure you against Amazon Leadership Principals. You'd be taking the test on a online code pad tool. You can use most of the popular programming languages. You can go to the tool and get familiar with the features before attempting the exam.

Test has two coding questions. First question is easier than the second. You will have 90 mins to complete both questions. Once you've submitted the code, you will get some MCQ questions about Leadership Principals. These questions is not timed, you can take as much as time you like.

Preparations

Let's see how to prepare for the tests. Brush up your knowledge on basic data structures like Stack, Linked List, Queue, Heap, Binary Search Trees, Hash Tables and Graphs. Sorting and searching are the most popular questions in test. So brush up your knowledge on Merge Sort, Quick Sort, Heap Sort, Binary Search.

Tree traversals are also important. Read up on DFS and BFS. Cover all three traversal models pre Order, in Order and Post order. Study Prim's and Dijkstra's algorithms for graph traversal. Also read about Divide and Conquer and Dynamic Programming.

You usually asked to provide the time/memory complexity of your code. So study how to calculate it. Also try to remember time complexity of classical algorithms.

Practice Practice Practice

Practice is the key. Do as much as practice questions you can. Try the practice questions of the book if you have it. Also there are several online web sites (like Leetcode) which provide hundreds of practice algorithmic questions. Make the best use of them.

During the Exam

You can access the internet during the exam. You are allowed to use your own IDE. But the risk is if you couldn't copy paste your code on time, you will loose everything.

Time is Precious

50% of the exam is about time management. Two questions are hard enough to make it difficult to finish both within 90 minutes. If the first question is the easier one, don't waste too much time on it.

If you are running out of time, prioritize the important bits of the algorithm. For example, if you are going to implement a sort, you should prioritize the Comparator since it's going to be to the core logic of the program. To have any chance to pass the interview, you should at least have something to show for, for both questions.

Write Good Code

This is the first time Amazon is going to see your code. So give the best first impression. Follow basics; use meaningful variable/method names, move the redundant code to functions. Try to create classes instead of using complex collections. Write comments where needed. Try to output the best industrial software you can.

Do not Brute Force

You may be tempted to solve problems by brute force. But this is highly dicoraged. Try to provide a optimal solution than the Brute Force. Having 60% completed code of the optimal solution is better than a 100% working code of theĀ  brute force solution.

Leadership Questions

After coding questions, you will have to answer a questionnaire which evaluates whether you are a good cultural fit for Amazon. Try to be your self and answer honestly. If you and company are not going to be a good match, it's going to be a bad move for both the parties.

Finally

Don't trust the tool too much save your work continuously as you progress. I took about 3 weeks to prepare my self for the coding test. Try to start early as possible.

Good luck!!!

Discover and read more posts from Lasith Eranda Haputhanthiri
get started
post comments8Replies
Siriparapu Sparshika
3 years ago

Hi today am writing my amazon sde online assessment which has 2codes could u please elaborate about that round? Should we even write the approach?

Vibha singh
3 years ago

Hi Sparshika. I am also about to take this test. Could you please share the experience of this online coding exam? It would be really helpful

jayesh bhoi
3 years ago

Hello Lasith, thanks for wonderful article. I got mail from Amazon to finish online coding test not later then one week. So in short time span can you please help me to give idea about most frequently asked coding questions?

Kritika Bhateja
3 years ago

Hi jayesh
I have got the same mail.

Could please give me the idea about the online coding test.

Ashu Thinks
2 years ago

even same for me can anyone help me here?

Kajonkeati Rattanasinchai
3 years ago

Do I need to pass both tasks?

Show more replies