Spotify Software Engineer Interview Questions

Review this list of 6 Spotify software engineer interview questions and answers verified by hiring managers and candidates.
  • Spotify logoAsked at Spotify 
    +10

    "we can use two pointer + set like maintain i,j and also insert jth character to set like while set size is equal to our window j-i+1 then maximize our answer and increase jth pointer till last index"

    Kishor J. - "we can use two pointer + set like maintain i,j and also insert jth character to set like while set size is equal to our window j-i+1 then maximize our answer and increase jth pointer till last index"See full answer

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

    "To answer this, I will focus my efforts on explaining the most common type of API used in most modern software development applications - the REST API. For the purpose of simplicity, I will also keep the topics of Authorization and Authentication out of the mix. In essence, an API is a group of logic that takes in a specific set of inputs and responds with a specific set of outputs. This is analogous to going to a drive-thru and placing an order for a meal. When you give an API a bunch of"

    Pathworks P. - "To answer this, I will focus my efforts on explaining the most common type of API used in most modern software development applications - the REST API. For the purpose of simplicity, I will also keep the topics of Authorization and Authentication out of the mix. In essence, an API is a group of logic that takes in a specific set of inputs and responds with a specific set of outputs. This is analogous to going to a drive-thru and placing an order for a meal. When you give an API a bunch of"See full answer

    Software Engineer
    Technical
    +3 more
  • Spotify logoAsked at Spotify 
    +15

    "def is_valid(s: str) -> bool: stack = [] closeToOpen = { ")" : "(", "]" : "[", "}" : "{" } for c in s: if c in closeToOpen: if stack and stack[-1] == closeToOpen[c]: stack.pop() else: return False else: stack.append(c) return True if not stack else False debug your code below print(is_valid("()[]")) `"

    Anonymous Roadrunner - "def is_valid(s: str) -> bool: stack = [] closeToOpen = { ")" : "(", "]" : "[", "}" : "{" } for c in s: if c in closeToOpen: if stack and stack[-1] == closeToOpen[c]: stack.pop() else: return False else: stack.append(c) return True if not stack else False debug your code below print(is_valid("()[]")) `"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • Spotify logoAsked at Spotify 
    +9

    "function hasCycle(head) { if (!head) return false; let slow = head; let fast = head.next; while (fast && fast.next && slow !== fast) { slow = slow.next; fast = fast.next.next; } return slow === fast; } `"

    Tiago R. - "function hasCycle(head) { if (!head) return false; let slow = head; let fast = head.next; while (fast && fast.next && slow !== fast) { slow = slow.next; fast = fast.next.next; } return slow === fast; } `"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
  • Spotify logoAsked at Spotify 

    Balanced Tree

    IDE
    Medium
    +5

    "function visitChildren(node) { let leftSubtreeHeight = 0; let rightSubtreeHeight = 0; let isChildrenBalanced = true; if (node.left) { const { isBalanced, height } = visitChildren(node.left); isChildrenBalanced = isChildrenBalanced && isBalanced; leftSubtreeHeight += height + 1; } if (isChildrenBalanced && node.right) { const { isBalanced, height } = visitChildren(node.right); isChildrenBalanced = isChildrenBalanced && isBalan"

    Tiago R. - "function visitChildren(node) { let leftSubtreeHeight = 0; let rightSubtreeHeight = 0; let isChildrenBalanced = true; if (node.left) { const { isBalanced, height } = visitChildren(node.left); isChildrenBalanced = isChildrenBalanced && isBalanced; leftSubtreeHeight += height + 1; } if (isChildrenBalanced && node.right) { const { isBalanced, height } = visitChildren(node.right); isChildrenBalanced = isChildrenBalanced && isBalan"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.

  • Spotify logoAsked at Spotify 
    +2

    "Make current as root. 2 while current is not null, if p and q are less than current, go left. If p and q are greater than current, go right. else return current. return null"

    Vaibhav D. - "Make current as root. 2 while current is not null, if p and q are less than current, go left. If p and q are greater than current, go right. else return current. return null"See full answer

    Software Engineer
    Data Structures & Algorithms
    +4 more
Showing 1-6 of 6