Skip to main content

Recent Software Engineer Interview Questions

Review this list of 650 Software Engineer interview questions and answers verified by hiring managers and candidates.
  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    Artificial Intelligence
    +3 more
  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    Artificial Intelligence
    +4 more
  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    Artificial Intelligence
    +5 more
  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    Artificial Intelligence
    +1 more
  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    Artificial Intelligence
    +2 more
  • 🧠 Want an expert answer to a question? Saving questions lets us know what content to make next.

  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    System Design
  • Anthropic logoAsked at Anthropic 
    Add answer
    Software Engineer
    Behavioral
    +5 more
  • "Build a counter using queue, one queue per service ("a", "b") and one with just timestamps to get the overall load. Build rate limiter service using the counter and interviewer asked if there rate limiter might use a different instance of a counter"

    Chethan N. - "Build a counter using queue, one queue per service ("a", "b") and one with just timestamps to get the overall load. Build rate limiter service using the counter and interviewer asked if there rate limiter might use a different instance of a counter"See full answer

    Software Engineer
    Coding
  • Apple logoAsked at Apple 
    2 answers

    "\# An program that prints out the peak elements in a list of integers. Pseudocode: 1. Define a function that takes a list of integers as input. 2. Initialize an empty list to store the peak elements. 3. Loop through the list of integers. 4. For each element, check if it is greater than its neighbors. 5. If it is, add it to the list of peak elements. 6. Return the list of peak elements. def findpeakelements(nums): if not nums: return [] peaks = [] n = len(nums"

    Frederick K. - "\# An program that prints out the peak elements in a list of integers. Pseudocode: 1. Define a function that takes a list of integers as input. 2. Initialize an empty list to store the peak elements. 3. Loop through the list of integers. 4. For each element, check if it is greater than its neighbors. 5. If it is, add it to the list of peak elements. 6. Return the list of peak elements. def findpeakelements(nums): if not nums: return [] peaks = [] n = len(nums"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Atlassian logoAsked at Atlassian 
    Add answer
    Software Engineer
    Behavioral
    +7 more
  • Meta logoAsked at Meta 
    2 answers

    "class TreeNode(var val: Int, var left: TreeNode? = null, var right: TreeNode? = null) fun isAverageOfDescendants(root: TreeNode?): Boolean { fun helper(node: TreeNode?): Triple { if (node == null) return Triple(0, 0, true) val (leftSum, leftCount, leftValid) = helper(node.left) val (rightSum, rightCount, rightValid) = helper(node.right) val totalSum = leftSum + rightSum val totalCount = leftCount + rightCount // If leaf n"

    Gaurav B. - "class TreeNode(var val: Int, var left: TreeNode? = null, var right: TreeNode? = null) fun isAverageOfDescendants(root: TreeNode?): Boolean { fun helper(node: TreeNode?): Triple { if (node == null) return Triple(0, 0, true) val (leftSum, leftCount, leftValid) = helper(node.left) val (rightSum, rightCount, rightValid) = helper(node.right) val totalSum = leftSum + rightSum val totalCount = leftCount + rightCount // If leaf n"See full answer

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

    "Approach (BFS + Horizontal Distance) Assign a horizontal distance (HD) to each node. Root → HD = 0 Left child → HD = parent HD - 1 Right child → HD = parent HD + 1 Do a BFS (level order traversal). If a node with a given HD is seen for the first time, add it to the result. Ignore later nodes with the same HD (because only the top one is visible). After traversal, sort by HD and print nodes left to righ"

    Firdous A. - "Approach (BFS + Horizontal Distance) Assign a horizontal distance (HD) to each node. Root → HD = 0 Left child → HD = parent HD - 1 Right child → HD = parent HD + 1 Do a BFS (level order traversal). If a node with a given HD is seen for the first time, add it to the result. Ignore later nodes with the same HD (because only the top one is visible). After traversal, sort by HD and print nodes left to righ"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Databricks logoAsked at Databricks 
    2 answers

    "Constraints: 4-direction moves; no mode switching (pick exactly one of {1=bicycle, 2=bike, 3=car, 4=bus} for the full trip). Per-mode search: If a mode’s per-step time/cost are uniform, run BFS on allowed cells. Then totaltime = steps × timeperstep, tie-break by steps × costper_step. If time/cost vary by cell (given matrices), run Dijkstra per mode minimizing (totaltime, totalcost) lexicographically. Maintain the best ⟨time, cost⟩ per cell; relax when the new pair is strictly better. S"

    Rahul J. - "Constraints: 4-direction moves; no mode switching (pick exactly one of {1=bicycle, 2=bike, 3=car, 4=bus} for the full trip). Per-mode search: If a mode’s per-step time/cost are uniform, run BFS on allowed cells. Then totaltime = steps × timeperstep, tie-break by steps × costper_step. If time/cost vary by cell (given matrices), run Dijkstra per mode minimizing (totaltime, totalcost) lexicographically. Maintain the best ⟨time, cost⟩ per cell; relax when the new pair is strictly better. S"See full answer

    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Oracle logoAsked at Oracle 
    Add answer
    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Google logoAsked at Google 
    1 answer

    "These are a set of utilities used to manage the heap memory as part of an application. The C standard library implements these functions. malloc(bytes) takes a number of bytes and returns a pointer to the start of the allocated buffer. If the allocation failed, a null pointer is returned instead. calloc(count, size) behaves like malloc(count * size), but also zero-initializes the allocated buffer, assuming the allocation succeeded. realloc(ptr, size) takes a pointer to a previously al"

    J R. - "These are a set of utilities used to manage the heap memory as part of an application. The C standard library implements these functions. malloc(bytes) takes a number of bytes and returns a pointer to the start of the allocated buffer. If the allocation failed, a null pointer is returned instead. calloc(count, size) behaves like malloc(count * size), but also zero-initializes the allocated buffer, assuming the allocation succeeded. realloc(ptr, size) takes a pointer to a previously al"See full answer

    Software Engineer
    Coding
    +1 more
  • Media.net logoAsked at Media.net 
    Add answer
    Software Engineer
    Data Structures & Algorithms
    +1 more
  • Yahoo logoAsked at Yahoo 
    1 answer

    "Open Oriented programming is a way to organize code around objects rather then functions."

    Yasir M. - "Open Oriented programming is a way to organize code around objects rather then functions."See full answer

    Software Engineer
    Concept
  • Databricks logoAsked at Databricks 
    6 answers
    +3

    "ingestion, processing & storage layer to handle document processing client ->API gateway/entry point->object storage-> queue-> worker-> database data flow: client initiates document upload + status processing API gateway (upload endpoint: authenticates & authorizes request, creates pre-assigned url to upload document); status endpoint object storage - stores uploaded document unstructured data (images, pdfs, docx etc) via preassigned url Message queue to decouple ingestion from proc"

    Tracy M. - "ingestion, processing & storage layer to handle document processing client ->API gateway/entry point->object storage-> queue-> worker-> database data flow: client initiates document upload + status processing API gateway (upload endpoint: authenticates & authorizes request, creates pre-assigned url to upload document); status endpoint object storage - stores uploaded document unstructured data (images, pdfs, docx etc) via preassigned url Message queue to decouple ingestion from proc"See full answer

    Software Engineer
    Data Pipeline Design
    +2 more
  • Goldman Sachs logoAsked at Goldman Sachs 
    Add answer
    Software Engineer
    Behavioral
    +1 more
  • "Function signature for reference: def calculate(servers: List[int], k: int) -> int: ... To resolve this, you can use binary search considering left=0 and right=max(servers) * k so Example: servers=[1,4,5] First server handle 1 request in let's say 1 second, second 4 seconds and last 5 seconds. k=10 So I want to know the minimal time to process 10 requests Get the mid for timeline mid = (left+right)//2 -> mid is 25 Check how many we could process 25//1 = 25 25//4=6 25//5=5 so 25 + 6 +"

    Babaa - "Function signature for reference: def calculate(servers: List[int], k: int) -> int: ... To resolve this, you can use binary search considering left=0 and right=max(servers) * k so Example: servers=[1,4,5] First server handle 1 request in let's say 1 second, second 4 seconds and last 5 seconds. k=10 So I want to know the minimal time to process 10 requests Get the mid for timeline mid = (left+right)//2 -> mid is 25 Check how many we could process 25//1 = 25 25//4=6 25//5=5 so 25 + 6 +"See full answer

    Software Engineer
    Coding
Showing 101-120 of 650