Spinny OA For SDE-2

spinny logo
spinny
sde-2Ongoing
August 11, 20253 reads

Summary

I recently completed the Online Assessment for an SDE-2 role at Spinny, which involved solving two data structures and algorithms problems.

Full Experience

I participated in the Online Assessment round for the SDE-2 position at Spinny. The assessment comprised two distinct coding challenges. The first problem tested my ability to manipulate strings efficiently using a sliding window approach, while the second required dynamic programming and tree traversal knowledge to find the maximum downward path sum in a forest structure. I focused on optimizing my solutions for both time and space complexity during the assessment.

Interview Questions (2)

Q1
Longest Substring With At Most K Zeros
Data Structures & Algorithms

You are given a binary string s consisting only of '0' and '1', and an integer k. Return the length of the longest substring of s that contains at most k zero characters.

Q2
Maximum Downward Path Sum in a Tree (Parent Array Representation)
Data Structures & Algorithms

You are given: An integer array parent of length n, where parent[i] is the parent of node i, and -1 indicates that node i is a root. An integer array value of length n, where value[i] is the value of node i. The nodes form a forest (one or more trees). A downward path is a sequence of nodes starting at some node and moving only to its children repeatedly. Return the maximum sum of any downward path in the forest. The path can start at any node and end at any descendant of that node (not necessarily a leaf). Node values may be negative.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!