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

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

Proxy Pattern

This is not same as Bridge Pattern. “Provide a surrogate or placeholder for another object to control access to it” is the intent provided by GoF.   When to use this pattern? Proxy pattern is used when we need to create a wrapper to cover the main object’s complexity from the client. Types of proxies Remote… Continue reading Proxy Pattern