Join me to stay up-to-date and get my new articles delivered to your inbox by subscribing here.
Python Implementation This implementation uses an indexed minimum priority queue data structure.
Motivation As stated here, a priority queue is an abstract data type similar to a regular queue or stack data structure in which each element additionally has a priority associated with it. The most common functions of priority queues are push and pop operations as same as regular queues. The time complexities of push and […]
Summary Yes, I know, it does not seem very professional. π But my aim was to keep it simple and efficient. All in all, this is a simple blog site. You will find some details below, I created my own WordPress theme. π If anyone wants to build a similar website, I can provide it […]
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) […]
My contention is, all kids have tremendous talents, and we squander them, pretty ruthlessly. Kids will take a chance. If they don’t know, they’ll have a go. They’re not frightened of being wrong. I don’t mean to say that being wrong is the same thing as being creative. If you’re not prepared to be wrong, […]
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 […]
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 […]
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 […]
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
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 […]