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

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

Load Balancer

Differences Between Layer 4 and Layer 7 Load Balancing -  Layer 4 load balancing operates at the intermediate transport layer, which deals with delivery of messages with no regard to the content of the messages. Transmission Control Protocol (TCP) is the Layer 4 protocol for Hypertext Transfer Protocol (HTTP) traffic on the Internet. Layer 4 load balancers simply forward network packets to and from… Continue reading Load Balancer