Coding interviews broken down
Stop memorizing solutions. Learn how to solve any question and become a strong hire.
Interviewing is so important for your career growth, yet so easy to mess up.
(We know - we've been on both sides as the interviewees and interviewers.)
- The two engineers who created InterviewCrunch
Get good at coding interviews
Adding to a list
O(n) or O(1)Here are two common methods to add elements to a list:
append()
adds the element to the end of the listinsert()
takes in a second argument that specifies what position to add the element at
Note
insert()
is an O(n) complexity operation whereas append()
is an O(1) operation, so use insert()
sparingly. If you need to only add to the front, consider using a queue.
1 Solidify your knowledge on Python basics
Walk through our easy lessons on the coding fundamentals you need to know before you even begin practicing coding questions.
2 Familiarize yourself with the essential coding patterns
Get a step-by-step explanation of each coding pattern by walking through our visual slides. We make it easier for you to learn more efficiently and understand the concepts better.
Valid Palindrome
Question
A phrase is a palindrome if it reads the same forward and backward after ignoring all non-alphanumeric characters like punctuation, symbols, capitalization, and spaces.
Write a function which returns true if the given string is a palindrome, and false if it’s not.
Input: Han ah!
Output: True
Input: Hugo
Output: False
3 Practice on real interview questions that follow an actual interview format
Practice problems that mirror a real interview experience, with no setup required to start implementing and testing code. Perfect for solo practice.
4 Profit from your improved interview skills
With enough practice, you'll be able to work your way through approaching almost any problem, and get job offers to improve both your career and personal development.