1 December - Minimum number of jumps to reach end | Set 2 (O(n) solution). SO 2 December - find sum(S) of all contiguous sub-array's max difference, SO 3 December - The Enlightened Ones. HE 4 December - Minimize Cash Flow among a given set of friends who have borrowed money from each other. GFG… Continue reading December Problem Solving
Class Diagram
Symbols and it's meaning in Class Diagram https://www.youtube.com/watch?v=xiUFTLIU-lw
Concurrency vs parallelism
Concurrency is about dealing with a lot of things at once while parallelism is about doing a lot of things at once. Video
Design a Meeting Scheduler
SO Lately, I took an interview. I was asked to design a meeting scheduler, just like in the Microsoft outlook calendar or the gmail calendar. I proposed that I will create an array of 48 for each day. Every 30 min representing the array entry. I have to make sure that the next appointment does… Continue reading Design a Meeting Scheduler
Cab Scheduling Algo
Link 1. Pure greedy Dispatch every idle car to pick up the closest passenger that is waiting for a ride. This is probably the most straight-forward approach, nonetheless quite effective. I’d venture to say that this is probably the most common approach for taxi companies because of its simplicity and ease of execution. 2. Greedy… Continue reading Cab Scheduling Algo
Design a Parking Lot
YouTube Link
Backtracking
Rat in a Maze GFG Algo: Shortest Path in a Binary Maze. This is solved using Lee Algorithm which is a basic BFS. GFG Link Algo: The idea is inspired from Lee algorithm and uses BFS. We start from the source cell and calls BFS procedure. We maintain a queue to store the coordinates of the matrix and… Continue reading Backtracking
PHP imp
why should one prefer call_user_func_array over regular calling of function? SO call_user_func_array is mostly used in dynamic contexts, when you don't know which function you will call and what arguments you are going to pass beforehand. In which scenario regular calling method will fail but call_user_func_array will not ? If you don't know beforehand how… Continue reading PHP imp
OAuth 2
OAuth 2 is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service, such as Facebook, GitHub, and DigitalOcean. It works by delegating user authentication to the service that hosts the user account, and authorizing third-party applications to access the user account. OAuth 2 provides authorization flows for… Continue reading OAuth 2