5.0 KiB
Basic steps for an algorithm:
input → instructions → execution → output → termination
These are more leetCode tips and tricks for python: 1. Using help() 2. Using enumerate() 3. Using items() 4. Using [] vs. get() 5. Range() is smarter than you think 6. Print(f'') debugging 7. For else 8. Using a list as a stack 9. sort() vs. sorted() 10. Using deque 11. Set and fronzenset 12. Using a stack instead of recusion 13. Using yield from 14. Pre-intialize your list 15. collections.Counter() 16. Using defaultdict() 17. Using heapq 18. Use biset for binary search 19. Using namedtuple and dataclasses 20. Using closures 21. Using match statement 22. Using OrderedDict 23. Using @functools.cache 24. Debugging ListNodes 25. Saving memory with the array module 26. Using an exception for the success case rather than the error case 27. Using VSCode, etc.
This youtube series offers great explanations of how to do each kind of problem! Amazon follows a similar pattern for testing, and the questions may change according to what position you’re interested in. For a software engineer, you’ll have a coding round of three to four questions, varying from easy to medium difficulty. Then you’ll undergo an aptitude and psychometric round.
Amazon’s online coding assessment includes these topics:
-
Number theory
-
Greedy algorithm
-
Binary search
-
Dynamic programming
-
Divide and conquer
-
Hash tables, maps, trees
-
Graph algorithm
Tips And Tricks To Help You Prepare
It helps candidates to have a strong skill set in data structure and algorithms. Although not required, Amazon offers support in multiple languages, so being bilingual might make you stand out from the crowd.
There are many ways to apply to Amazon, whether on campus, via referral, or through a coding contest. Practice all the important topics previously listed in LeetCode (more about LeetCode is explained below). Try to complete 30 to 40 questions from each topic to make sure you have a broad range of knowledge and are prepared for anything.
The questions for this assessment can be difficult. But if you dedicate three to four months in advance, you’ll optimize your coding skills. With the right preparation, the test will be easier. Be familiar with coding platforms, practice on popular sites, and also check questions from previous interviews.
Preparation strategy Amazon Online Coding Test
Do practise all the important topics given before and also strategy practising from Leetcode. Ideally, there is no number but you can try practising 30-40 questions from each topic and it will be enough for most of the hiring challenges.
Five Things that Amazon Is Measuring Using the Online Coding Test
-
Problem Statement Retention: can you read a coding problem and understand what it’s asking?
-
Coding Ability: can you understand the problem, figure out an efficient solution, and then translate the solution into an accurate code?
-
Data Structure Application: can you take a problem and apply an appropriate data structure to solve the problem in the simplest way? Do you know when to use a list/map/set/etc.?
-
Runtime Complexity: can you go over your own code and assess what runtime complexity and major issues it might have?
-
Simplification: can you create a simple solution to a complicated problem, in a way that most people would understand?
Two Things That Amazon Is NOT Testing On This Online Coding Round
-
Deep Knowledge of a Specific Language: you can code in any language that you feel comfortable with and Amazon won’t be testing your expertise in specific languages.
-
Purposefully Confusing or Tricky Questions: the coding problems are straightforward and are not intended to trick you in any way.
Amazon is interested in your demonstration of problem-solving, writing correct code, applying patterns, data structures and algorithms, and optimizing for algorithmic performance on the tests.
*Note: As of 2022, Amazon removed the coding approach questionnaire and debugging questions parts.
How to Prepare for the Amazon Coding Assessment?
When preparing for the online coding test, focus on these four areas:
-
Algorithms: Basic Searching, Basic Sorting, Tree Traversal, Graph Traversal.
-
Data Structures: Heaps, linked lists, arrays, trees (especially binary trees), hash tables, stacks, and recursion.
-
Fundamentals: Go back and re-educate yourself on all data structures and data structure algorithms. Understand all time and space complexity. Make sure you even get into more unique things, like hashmaps, b+trees (and variants), and caches (and associated algorithms).
Understand high-scale architecture: Go look at how other big sites are structured