Interview Questions

Review this list of 4,348 interview questions and answers verified by hiring managers and candidates.
  • +12

    "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

    Product Manager
    Analytical
  • "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

    Software Engineer
    Coding
    +2 more
  • Anduril logoAsked at Anduril 

    "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

    Software Engineer
    Behavioral
    +8 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +1

    "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

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    +1

    "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

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • "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

    Software Engineer
    Behavioral
  • Amazon logoAsked at Amazon 

    "Count items between indices within compartments compartments are delineated by by: '|' items are identified by: '*' input_inventory = "*||||" inputstartidxs = [1, 4, 6] inputendidxs = [9, 5, 8] expected_output = [3, 0, 1] Explanation: "*||||" 0123456789... indices ++ + # within compartments ^ start_idx = 1 ^ end_idx = 9 -- - # within idxs but not within compartments "*||||" 0123456789... indices "

    Anonymous Unicorn - "Count items between indices within compartments compartments are delineated by by: '|' items are identified by: '*' input_inventory = "*||||" inputstartidxs = [1, 4, 6] inputendidxs = [9, 5, 8] expected_output = [3, 0, 1] Explanation: "*||||" 0123456789... indices ++ + # within compartments ^ start_idx = 1 ^ end_idx = 9 -- - # within idxs but not within compartments "*||||" 0123456789... indices "See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Amazon logoAsked at Amazon 

    "input_logs = [ f"{senderid} {receiverid} {transaction_count}" "1 2 2", "3 2 42", "2 2 22", "1 1 12", "2 1 1", "2 5 4", "4 2 15" ] input_threshold = 20 exptected_output = [ list of user_ids that made more than 20 transactions sorted by number of transactions in descending order "3", # 42 transactions "2", # 27 transactions (22 + 1 + 4) #"4", # 15 transactions #"1" # 14 transactions (2 + 12 + 1) ] def gettopapi_users(logs, thres"

    Anonymous Unicorn - "input_logs = [ f"{senderid} {receiverid} {transaction_count}" "1 2 2", "3 2 42", "2 2 22", "1 1 12", "2 1 1", "2 5 4", "4 2 15" ] input_threshold = 20 exptected_output = [ list of user_ids that made more than 20 transactions sorted by number of transactions in descending order "3", # 42 transactions "2", # 27 transactions (22 + 1 + 4) #"4", # 15 transactions #"1" # 14 transactions (2 + 12 + 1) ] def gettopapi_users(logs, thres"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • New York Times logoAsked at New York Times 

    "input = [ {"topic": 1, "chapter": 1, "section": 1}, {"topic": 2, "chapter": 2, "section": 1}, {"topic": 3, "chapter": 2, "section": 2}, {"topic": 4, "chapter": 1, "section": 1}, {"topic": 5, "chapter": 1, "section": 1}, {"topic": 6, "chapter": 2, "section": 2}, {"topic": 7, "chapter": 2, "section": 2}, {"topic": 8, "chapter": 2, "section": 3}, ] expected_output = [ {'chapter': 1, 'sections': [ {'section': 1, 'topics': [ {'top"

    Anonymous Unicorn - "input = [ {"topic": 1, "chapter": 1, "section": 1}, {"topic": 2, "chapter": 2, "section": 1}, {"topic": 3, "chapter": 2, "section": 2}, {"topic": 4, "chapter": 1, "section": 1}, {"topic": 5, "chapter": 1, "section": 1}, {"topic": 6, "chapter": 2, "section": 2}, {"topic": 7, "chapter": 2, "section": 2}, {"topic": 8, "chapter": 2, "section": 3}, ] expected_output = [ {'chapter': 1, 'sections': [ {'section': 1, 'topics': [ {'top"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "naive solution: def countprefixpairs(words): n = len(words) count = 0 for i in range(n): for j in range(i + 1, n): if words[i].startswith(words[j]) or words[j].startswith(words[i]): count += 1 return count using tries for when the list of words is very long: from collections import Counter class TrieNode: def init(self): self.children = {} self.count = 0 # To count the number of words ending at this node"

    Anonymous Unicorn - "naive solution: def countprefixpairs(words): n = len(words) count = 0 for i in range(n): for j in range(i + 1, n): if words[i].startswith(words[j]) or words[j].startswith(words[i]): count += 1 return count using tries for when the list of words is very long: from collections import Counter class TrieNode: def init(self): self.children = {} self.count = 0 # To count the number of words ending at this node"See full answer

    Software Engineer
    Coding
  • Uber Eats logoAsked at Uber Eats 

    "Objective: Migrate from subscription base business revenue model to ads based revenue model. Continue with subscription base revenue model, showcase ads on platform only. (Not in between the content). Continue with subscription base revenue model, showcase ads on platform and in between content. Provide different monthly plans based on with ads or without ads Increase revenue by X% - Decide based on this object what revenue model to accept. Assumption: Netflix wants to continue"

    dungeonMaster - "Objective: Migrate from subscription base business revenue model to ads based revenue model. Continue with subscription base revenue model, showcase ads on platform only. (Not in between the content). Continue with subscription base revenue model, showcase ads on platform and in between content. Provide different monthly plans based on with ads or without ads Increase revenue by X% - Decide based on this object what revenue model to accept. Assumption: Netflix wants to continue"See full answer

    Product Manager
    Product Design
  • "python: def justifywords(wordslist, width): result = [] currlinechar_count = 0 curr_words = [] for word in words_list: if curr_words: space_needed = len(word) + 1 # Space needed for the word and a preceding space else: space_needed = len(word) if currlinecharcount + spaceneeded > width: result.append(' '.join(curr_words)) curr_words = [word] currlinechar_count = len("

    Anonymous Unicorn - "python: def justifywords(wordslist, width): result = [] currlinechar_count = 0 curr_words = [] for word in words_list: if curr_words: space_needed = len(word) + 1 # Space needed for the word and a preceding space else: space_needed = len(word) if currlinecharcount + spaceneeded > width: result.append(' '.join(curr_words)) curr_words = [word] currlinechar_count = len("See full answer

    Software Engineer
    Coding
  • +2

    "The goal is to balance parentheses in a given string by removing the fewest characters possible. The balanced string should ensure that each opening parenthesis ( has a corresponding closing parenthesis ) and that all pairs are properly nested. Approach To achieve this, we can use a combination of a stack and a set to track unmatched parentheses: Stack: The stack will be used to record the indices of unmatched opening parentheses ( as we traverse the string. Set: We will"

    Victoria G. - "The goal is to balance parentheses in a given string by removing the fewest characters possible. The balanced string should ensure that each opening parenthesis ( has a corresponding closing parenthesis ) and that all pairs are properly nested. Approach To achieve this, we can use a combination of a stack and a set to track unmatched parentheses: Stack: The stack will be used to record the indices of unmatched opening parentheses ( as we traverse the string. Set: We will"See full answer

    Machine Learning Engineer
    Data Structures & Algorithms
    +2 more
  • +8

    "Used Recursive approach to traverse the binary search tree and sum the values of the nodes that fall within the specified range [low, high]"

    Srikant V. - "Used Recursive approach to traverse the binary search tree and sum the values of the nodes that fall within the specified range [low, high]"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Software Engineer
    Data Structures & Algorithms
    +1 more
  • "hash maps work in key value pair. The keys are hashed with a hash algorithm and resulting hashcode(integer) with related value are stored. Accessing a value, removing an element, Searching the hash map: 1) The hash map value can be accessed in O(1) time once you know the key. 2) If the key is not known, the hashmap value can be accessed in O(n) since you have to iterate atleast once. "

    Kavithadevi P. - "hash maps work in key value pair. The keys are hashed with a hash algorithm and resulting hashcode(integer) with related value are stored. Accessing a value, removing an element, Searching the hash map: 1) The hash map value can be accessed in O(1) time once you know the key. 2) If the key is not known, the hashmap value can be accessed in O(n) since you have to iterate atleast once. "See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "ArrayList allows constant time access (O(1)) to elements using their index because it uses a dynamic array internally, whereas LinkedList requires traversal from the head node, resulting in linear time complexity (O(n))."

    Aziz V. - "ArrayList allows constant time access (O(1)) to elements using their index because it uses a dynamic array internally, whereas LinkedList requires traversal from the head node, resulting in linear time complexity (O(n))."See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • "Memory allocation happens for storing a reference pointer as well as the default size of the generic object class depending on the language this is called in. Assuming this is in a JVM, this data is stored in metaspace, and memory allocation happens in heap."

    Alex W. - "Memory allocation happens for storing a reference pointer as well as the default size of the generic object class depending on the language this is called in. Assuming this is in a JVM, this data is stored in metaspace, and memory allocation happens in heap."See full answer

    Software Engineer
    Concept
  • +2

    "Step 1: Clarifying the Problem Scope We will focus on designing the leaderboard for Dream11 with these assumptions: Registered teams: 100,000 users are actively participating and ranked. Real-time updates: Leaderboard updates frequently as players accumulate points based on live sports events. Multiple leagues: Each user can participate in different leagues, so we will need to maintain a separate leaderboard for each league. Query efficiency: Users frequently"

    Ramendra S. - "Step 1: Clarifying the Problem Scope We will focus on designing the leaderboard for Dream11 with these assumptions: Registered teams: 100,000 users are actively participating and ranked. Real-time updates: Leaderboard updates frequently as players accumulate points based on live sports events. Multiple leagues: Each user can participate in different leagues, so we will need to maintain a separate leaderboard for each league. Query efficiency: Users frequently"See full answer

    Engineering Manager
    System Design
Showing 1201-1220 of 4348