Category: Coding & Algorithm Interview

Join me to stay up-to-date and get my new articles delivered to your inbox by subscribing here.

Shortest Path (Dijkstra) - October 28, 2022

Python Implementation This implementation uses an indexed minimum priority queue data structure.

Read more

Book Review: Algorithms (Robert Sedgewick – Kevin Wayne) - October 23, 2022

Summary To me, its content is priceless. For sure, this extraordinary book comes at a cost, you can purchase the textbook in either hardcover or electronic format. But, there is another completely FREE option. Yes, it is too good to be true but it is true. 🙂 Two free courses (Part I and Part II) […]

Read more

Coding Interview Question: Find the greatest integer smaller than N with the same set of digits as N - October 20, 2022

Question Given an integer N, find the greatest integer less than N and has the same digits. If there is no such integer, return -1. For example: Input = 630 Output = 603 Input = 603 Output = 360 Input = 360 Output = 306 Input = 306 Output = -1 (Be careful, 063 could […]

Read more

Coding Interview Question: Nested List Weight Sum - October 15, 2022

Question Imagine an array that contains both integers and nested arrays, such as the following: [[2, [9, 1, 3], 8], 1, 4]. The depth sum is described as the weighted sum of each integer, weighted by their respective depths. In the example, 9’s depth is 3, while 8’s depth is 2, and 4’s depth is […]

Read more

Quick Select: Linear runtime complexity to find the median of unsorted arrays - October 12, 2022

Introduction I reviewed some implementations of the median function in widely used statistics packages. They use simple flow like sorting the array and returning the middle element.The average runtime complexity of comparison-based sorting algorithms is linearithmic -> O(N log N)And choosing the middle element is of constant runtime complexity -> O(1)So the runtime complexity of […]

Read more

Best Resources for Tech Interviews (Coding & System Design) - October 9, 2022

Best Books for System Design Interviews Best Books for Coding Interviews Best Online Courses for Coding Interviews If you need further guidance or mentorship, drop me a line

Read more

Preparation Guide for Tech Interviews – Ace Your Google & Facebook (Meta) Interviews - September 18, 2022

Resume Preparation Resources Create Your Resume for Google: Tips and Advice General Interview Tips Explain – We want to understand how you think, so explain your thought process and decision making throughout the interview. Remember we’re not only evaluating your technical ability, but also how you solve problems. Explicitly state and check assumptions with your interviewer […]

Read more

Google Meta Amazon Coding Interview Question – Toeplitz Matrix - March 22, 2022

Given a matrix in the form (int height, int weight, vector < vector < int > > matrix), determine if the matrix is in the form of Toeplitz. In linear algebra, a Toeplitz matrix or diagonal-constant matrix, named after Otto Toeplitz, is a matrix in which each descending diagonal from left to right is constant. […]

Read more

Competitive Programming - February 10, 2022

Aka Sports Programming. If you like to develop code, learn, use and create data structures / algorithms, it’s a sport for you. It is a fun world where you can come together and compete with those who love to do the same sport, and you can practice as much as you want outside the competitions. […]

Read more

1 2 3