explaination
How To traverse a binary tree recursively ?
We can traverse through all the nodes of a binary tree by writing a recursive function similar to depth first traversal in a graph. We will create a recursive function which takes a node as a parameter and then starts visiting the left child and the right child of the node. Based on the order …
Hash Tables
Hash Tables Hash tables is a data structure which is used to map a set of keys to its corresponding values. They are a very common data structure and multiple problems use hash table directly/indirectly to solve multiple problems. There are primarily two types of hash tables: Direct Address Table Direct Address Table is a …
Open Addressing
Open Addressing Open addressing is a collision resolution technique in which a method known as probing is used to make efficient use of the hash table’s space. All elements are stored in the hash table itself in open addressing. Unlike chaining, multiple elements cannot be stored in the same slot in the hash table. Probing: …
Chaining
Chaining Chaining is a collision resolution technique used when a hash function provides the same index for multiple values. These elements are stored at the same index by making use of a linked list data structure. For example, if the hash function being used is h(k) = k % 10 for the keys : {13, …
System Design Must Read Papers
System design is one of the most fascinating topics in software engineering. What makes system design so interesting is that there are no right or wrong design choices; there are only tradeoffs. For people who are interested in system design and the tradeoffs and design choices used when designing large scale systems, we have collected …
What is caching ?
What is caching ? In simpler language, caching is used for speeding up access to certain set of frequently accessed data. A cache is a layer b/w the client and the server. Each request that the client makes to the server, first goes through the cache. This serves two purpose : Cache Hit: If the …
What are the different load balancing algorithms
What are the different load balancing algorithms ? There are multiple different types of load balancing algorithms that a load balancer can use while routing requests from a client. 1 Round Robin Round robin algorithm is the simplest of all the load balancing algorithms. In this algorithm, the requests are routed to a server in …
What are the different load balancing algorithms Read More »
What is load balancing?
What is load balancing ? How does a load balancer work ? Load balancer is a subsystem which acts as a layer b/w your cluster of servers and the clients who are trying to access them. As its name indicates, it is used to balance the load on our application servers as shown in the …
Quick Sort
Quick Sort Quicksort is a highly efficient sorting algorithm in which a list or array of elements is partitioned into smaller arrays. A pivot(or central) element is selected in the array. The pivot element can be the first element, the last element, or any random element. The elements smaller than the pivot element are put …