Array Funtions

array_map() array_filter() array_walk() array_map() Array map is a function that is used in a situation when you want to apply a function on each and every value of an array. It will pass two parameters one is the function and the second is the array, it will work as a callback function that calls another […]

Java Interview Questions

Q: Why variables in the interface are public, static, and final? A: static: We don’t create an instance of Interface, so for accessing this variable we have onlyinterface name, for that purpose: variables in java are static.final : To make them constants. If 2 classes implement the same interface and you give both of them […]

If-Else in java

If-else statements are used in java which is used when you want to execute some code based on conditions. eg: if(a > 10){ System.out.print(“a is greater”); } The message “a is greater” will only gets printed when the value if a is greater than 10.

Variables in Java

A variable is a name or label given to the storage that holds data. We use variables to store data such as name, age, credit card info etc. which can be used later in our application to perform operations. Declaring variables Java is a strictly typed language which means that you have to define the […]

CAP Theorem

CAP theorem states that if there is partitioning in the distributed system then the system can either offer Consistency or Availability. Let’s understand it in detail Consistency Consistency means that at any given time all the nodes of the distributed system should give same response.  Eg, Suppose there are two nodes, A and B If […]

Love Babbar’s 450 DSA Questions

Arrays Reverse the array Find the maximum and minimum element in an array Find the “Kth” max and min element of an array Given an array which consists of only 0, 1 and 2. Sort the array without using any sorting algo Move all the negative elements to one side of the array Find the […]

API standards

What is API? API is a communication between two parties. Communication is to get or send data between two parties. Which standard we are following?We are following OpenApi Specification to design our apis. There will be 3 kinds of responses on which we are working validation errorstatus code = 400 response:- “errors”:{ “field”:[ “error1”, “error2” […]


write/day x size of write x time to store data [no of years] 10 mill write x 1.5 MB = 15 TB / day (15 TB x 365 days x 10) = 55 Pettabyte


Req / day xreq size 300 mill reqx x 1.5 MB = 450, 000 GB 450, 000 GB / 86400 sec = 5.2 GB / sec

Memory estimate

Read requies per day x Avg Req size x 0.2 (80/20 principle) 300 mill Req x 500 bytes = 150 GB 150 GB x 0.2 (20%) = 30 GB 30 GB * 3 (replicas) = 90 GB)