"The interviewer focused on the data models and steered the conversation there from the beginning. He had a specific design in mind and I just wasn't hitting it. He also wanted details on how I would implement the logic for splitting users into variants. I would recommend reading the LinkedIn blog on their AB Test system design."
Anonymous Kingfisher - "The interviewer focused on the data models and steered the conversation there from the beginning. He had a specific design in mind and I just wasn't hitting it. He also wanted details on how I would implement the logic for splitting users into variants. I would recommend reading the LinkedIn blog on their AB Test system design."See full answer
"As far as i know, when we type a web address in the browser-
the broswer connects to the DNS server & finds the address of the website we are looking for
after finding it, the browser sends an HTTP request message to the server,with a request to send a copy of the website to the user.
all of this information is sent using TCP/IP protocol across your internet"
Debajyoti B. - "As far as i know, when we type a web address in the browser-
the broswer connects to the DNS server & finds the address of the website we are looking for
after finding it, the browser sends an HTTP request message to the server,with a request to send a copy of the website to the user.
all of this information is sent using TCP/IP protocol across your internet"See full answer
"Should this question be BST, not just BT? Otherwise it would not be possible to reconstruct the tree solely based on the array regardless of its order"
TreeOfWisdom - "Should this question be BST, not just BT? Otherwise it would not be possible to reconstruct the tree solely based on the array regardless of its order"See full answer
"Problem Statement: The Fibonacci sequence is defined as F(n) = F(n-1) + F(n-2) with F(0) = 1 and F(1) = 1.
The solution is given in the problem statement itself.
If the value of n = 0, return 1.
If the value of n = 1, return 1.
Otherwise, return the sum of data at (n - 1) and (n - 2).
Explanation: The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, typically starting with 0 and 1.
Java Solution:
public static int fib(int n"
Rishi G. - "Problem Statement: The Fibonacci sequence is defined as F(n) = F(n-1) + F(n-2) with F(0) = 1 and F(1) = 1.
The solution is given in the problem statement itself.
If the value of n = 0, return 1.
If the value of n = 1, return 1.
Otherwise, return the sum of data at (n - 1) and (n - 2).
Explanation: The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, typically starting with 0 and 1.
Java Solution:
public static int fib(int n"See full answer
"Binary Search on the array and after than compare the numbers at low and the high pointers whichever is closest is the answer. Because after the binary search low will be pointing to a number which is immediate greater than x and high will be pointing to a number which is immediate lesser than x.
int low = 0;
int high = n-1;
while(low <= high){
int mid = (low + high) / 2;
if(x == arr[mid]) return mid; //if x is already present then it will be the closest
else if(x < arr[mid]) high"
Shashwat K. - "Binary Search on the array and after than compare the numbers at low and the high pointers whichever is closest is the answer. Because after the binary search low will be pointing to a number which is immediate greater than x and high will be pointing to a number which is immediate lesser than x.
int low = 0;
int high = n-1;
while(low <= high){
int mid = (low + high) / 2;
if(x == arr[mid]) return mid; //if x is already present then it will be the closest
else if(x < arr[mid]) high"See full answer
"A load balancer accepts requests from clients (e.g. web browsers on the Internet) and backend services (e.g. a web server). Load balancers are useful for replicating backend services onto multiple machines to meet increased demand.
The design of a load balancer should address the following questions:
What protocols should be supported?
IP allows computers to communicate using packets, similarly to how people send letters. IP packets are addressed using an IP address and port number.
"
Anonymous Hyena - "A load balancer accepts requests from clients (e.g. web browsers on the Internet) and backend services (e.g. a web server). Load balancers are useful for replicating backend services onto multiple machines to meet increased demand.
The design of a load balancer should address the following questions:
What protocols should be supported?
IP allows computers to communicate using packets, similarly to how people send letters. IP packets are addressed using an IP address and port number.
"See full answer
"`#include
using namespace std;
void printNumbersTillN(int n){
if(n_==0){
return;
}
printNumbersTillN(n-1); // go to the end -> reach 1
cout>_n;
printNumbersTillN(n);
}`"
Jet 1. - "`#include
using namespace std;
void printNumbersTillN(int n){
if(n_==0){
return;
}
printNumbersTillN(n-1); // go to the end -> reach 1
cout>_n;
printNumbersTillN(n);
}`"See full answer
"A much better solution than the one in the article, below:
It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods.
shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns.
My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N))
class ListNode {
constructor(val = 0, next = null) {
th"
Guilherme F. - "A much better solution than the one in the article, below:
It looks like the ones writing articles here in Javascript do not understand the time/space complexity of javascript methods.
shift, splice, sort, etc... In the solution article you have a shift and a sort being done inside a while, that is, the multiplication of Ns.
My solution, below, iterates through the list once and then sorts it, separately. It´s O(N+Log(N))
class ListNode {
constructor(val = 0, next = null) {
th"See full answer
"Did pretty ok. Gathered requirements, back of the envelope calculations and drew out the typical system design with details of components. Dug in deep into each box and probed around why it was needed."
S R. - "Did pretty ok. Gathered requirements, back of the envelope calculations and drew out the typical system design with details of components. Dug in deep into each box and probed around why it was needed."See full answer
"This system design question is very small compared to other questions like design instagram, twitter, google drive etc... Since the design involves less components the level of detail we have to go in them were deep. I had to explain how to deal with all the NFR for the distributed cache system. Whether it is a push model or a pull model. Hade to do BOE calculations for the database too."
Jagan M. - "This system design question is very small compared to other questions like design instagram, twitter, google drive etc... Since the design involves less components the level of detail we have to go in them were deep. I had to explain how to deal with all the NFR for the distributed cache system. Whether it is a push model or a pull model. Hade to do BOE calculations for the database too."See full answer
"function areSentencesSimilar(sentence1, sentence2, similarPairs) {
if (sentence1.length !== sentence2.length) return false;
for (let i=0; i (w1 === word1 && !visited.has(w2)) || (w2 === word1 && !visited.has(w1)));
if (!edge) {
"
Tiago R. - "function areSentencesSimilar(sentence1, sentence2, similarPairs) {
if (sentence1.length !== sentence2.length) return false;
for (let i=0; i (w1 === word1 && !visited.has(w2)) || (w2 === word1 && !visited.has(w1)));
if (!edge) {
"See full answer
"To recount an experience from my last project . We were at the initial stages of designing a new data platform to enhance our trading analytics capabilities. The conflict arose over the selection of a data processing framework. I was advocating for Apache Spark due to its scalability and performance benefits, especially for handling large volumes of derivatives data. Another senior team member preferred a different technology they had more experience with, which they believed would be easier to"
Scott S. - "To recount an experience from my last project . We were at the initial stages of designing a new data platform to enhance our trading analytics capabilities. The conflict arose over the selection of a data processing framework. I was advocating for Apache Spark due to its scalability and performance benefits, especially for handling large volumes of derivatives data. Another senior team member preferred a different technology they had more experience with, which they believed would be easier to"See full answer