"Write a function which Caesar ciphers all the strings so that the first character is "a". Use ascii code points and the modulo operator to do this.
Use this function to create a hashmap between each string and the CC-a string. Then go through each key:value pair in the hashmap, and use the CC-a ciphered value as the key in a new defaultdict(list), adding the original string to the value field in the output."
Michael B. - "Write a function which Caesar ciphers all the strings so that the first character is "a". Use ascii code points and the modulo operator to do this.
Use this function to create a hashmap between each string and the CC-a string. Then go through each key:value pair in the hashmap, and use the CC-a ciphered value as the key in a new defaultdict(list), adding the original string to the value field in the output."See full answer
"Use an index, two pointers, and a set to keep track of elements that you've seen.
pseudo code follows:
for i, elem in enumerate(array):
if elem in set return False
if i > N:
set.remove(array[i-N])"
Michael B. - "Use an index, two pointers, and a set to keep track of elements that you've seen.
pseudo code follows:
for i, elem in enumerate(array):
if elem in set return False
if i > N:
set.remove(array[i-N])"See full answer
"I would answer this question using MECE framework:
Profit = Revenue - Costs.
Revenue = # customers * price
In case of the trading platform, this could be translated into avg. trading activity per user * avg. commission rate . Ask if there has been any recent change to Active users or their trading activities. Similarly, ask if the commission rate has been changed recently.
Based on this information, you can then identify the problem and get to the root cause of this.
Similarly with Costs.
"
Alibi M. - "I would answer this question using MECE framework:
Profit = Revenue - Costs.
Revenue = # customers * price
In case of the trading platform, this could be translated into avg. trading activity per user * avg. commission rate . Ask if there has been any recent change to Active users or their trading activities. Similarly, ask if the commission rate has been changed recently.
Based on this information, you can then identify the problem and get to the root cause of this.
Similarly with Costs.
"See full answer
"Started by asking clarification questions regarding design constraints and desired features.
Break down the into re-usable components - HeroImg and Carousel (with 3 images rendered)
Code the components and managed the state for both in the parent component."
Akshay J. - "Started by asking clarification questions regarding design constraints and desired features.
Break down the into re-usable components - HeroImg and Carousel (with 3 images rendered)
Code the components and managed the state for both in the parent component."See full answer
"Clarification:
What types of jobs are we targeting? Are we talking about a broad market (like Indeed) or more focused—white-collar (LinkedIn-style) or blue-collar (gigs and tasks)?
Where are we launching the marketplace—U.S. or globally? Let’s assume U.S. for now.
Is this a standalone product or integrated within one of Meta’s existing platforms (Facebook, WhatsApp, Instagram)? Let’s assume it’s integrated into Facebook.
Overview:
Meta’s Mission: Why would Meta want to launch a"
Kat - "Clarification:
What types of jobs are we targeting? Are we talking about a broad market (like Indeed) or more focused—white-collar (LinkedIn-style) or blue-collar (gigs and tasks)?
Where are we launching the marketplace—U.S. or globally? Let’s assume U.S. for now.
Is this a standalone product or integrated within one of Meta’s existing platforms (Facebook, WhatsApp, Instagram)? Let’s assume it’s integrated into Facebook.
Overview:
Meta’s Mission: Why would Meta want to launch a"See full answer
"Abstract class
A class that can have Abstract methods - without implementations and Concerete Methods i.e with implementation.
Can have private, protected and public access modifiers.
Supports Single inheritance i.e a class can extend only 1 abstract class
Can have constructors
Mainly used when sharing common behaviors
Interface Class
A collection of abstract methods ( can have static and default methods also - onwards of java 8)
Public, static, final are the access"
Sue G. - "Abstract class
A class that can have Abstract methods - without implementations and Concerete Methods i.e with implementation.
Can have private, protected and public access modifiers.
Supports Single inheritance i.e a class can extend only 1 abstract class
Can have constructors
Mainly used when sharing common behaviors
Interface Class
A collection of abstract methods ( can have static and default methods also - onwards of java 8)
Public, static, final are the access"See full answer
"For any project based questions, it is important to structure your response clearly, showcasing your thought process, technical skills, problem-solving abilities, and how your work added value. Besides the STAR method, you can also use this kind of framework:
1. Start by selecting a relevant project (related to the role)
Give the project background and what specific problem it solved.
2. Align the project's objective and your role
Be specific about your role: were you the le"
Malay K. - "For any project based questions, it is important to structure your response clearly, showcasing your thought process, technical skills, problem-solving abilities, and how your work added value. Besides the STAR method, you can also use this kind of framework:
1. Start by selecting a relevant project (related to the role)
Give the project background and what specific problem it solved.
2. Align the project's objective and your role
Be specific about your role: were you the le"See full answer
"need to handle cases where src and dst overlaps:
src starts before dst // start copying from end
dst starts before src // start copying from beginning"
Kun P. - "need to handle cases where src and dst overlaps:
src starts before dst // start copying from end
dst starts before src // start copying from beginning"See full answer
"public class CircularBuffer {
private T[] buffer;
private int head;
private int tail;
private int size;
private final int capacity;
public CircularBuffer(int capacity) {
this.capacity = capacity;
this.buffer = (T[]) new Object[capacity];
this.head = 0;
this.tail = 0;
this.size = 0;
}
public void enqueue(T item) {
if (isFull()) {
throw new IllegalStateException("Buffer is full");
}
buf"
Vidhyadhar V. - "public class CircularBuffer {
private T[] buffer;
private int head;
private int tail;
private int size;
private final int capacity;
public CircularBuffer(int capacity) {
this.capacity = capacity;
this.buffer = (T[]) new Object[capacity];
this.head = 0;
this.tail = 0;
this.size = 0;
}
public void enqueue(T item) {
if (isFull()) {
throw new IllegalStateException("Buffer is full");
}
buf"See full answer
"While answering such a question, it is important to focus on personal growth, learning, and how the experience improved your teamwork. You want to demonstrate self-awareness, humility, and an ability to adapt.
I had this experience while working on a cross-functional project that involved collaboration between the engineering and marketing teams. In the interview, I shared a story when I misjudged someone and showed unconscious bias towards due their gender, ethnicity or age. It was embarrassin"
Malay K. - "While answering such a question, it is important to focus on personal growth, learning, and how the experience improved your teamwork. You want to demonstrate self-awareness, humility, and an ability to adapt.
I had this experience while working on a cross-functional project that involved collaboration between the engineering and marketing teams. In the interview, I shared a story when I misjudged someone and showed unconscious bias towards due their gender, ethnicity or age. It was embarrassin"See full answer