Interview Questions

Review this list of 3,944 interview questions and answers verified by hiring managers and candidates.
  • "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

    Machine Learning Engineer
    Coding
    +1 more
  • "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

    Machine Learning Engineer
    Coding
  • "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

    Product Manager
    Analytical
    +1 more
  • Intuit logoAsked at Intuit 

    "did well but messed up dequeue"

    Shivani N. - "did well but messed up dequeue"See full answer

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

  • Product Manager
    Analytical
    +2 more
  • Meta (Facebook) logoAsked at Meta (Facebook) 
    Product Manager
    Product Design
  • Asked at The Trade Desk 

    "Design the cache, set policy like LRU or other custom policies."

    Poha - "Design the cache, set policy like LRU or other custom policies."See full answer

    Software Engineer
    System Design
  • Backend Engineer
    Data Structures & Algorithms
    +1 more
  • "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

    Frontend Engineer
    Coding
  • Amazon logoAsked at Amazon 
    Product Manager
    Technical
  • +11

    "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
  • Goldman Sachs logoAsked at Goldman Sachs 

    "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
  • Apple logoAsked at Apple 
    +1

    "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
    +5 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
    Coding
    +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
    Coding
    +1 more
  • Apple logoAsked at Apple 

    "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 

    "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
    Coding
    +1 more
Showing 781-800 of 3944