Cohesity Interview Experience

cohesity logo
cohesity
No Offer
December 15, 20259 reads

Summary

I recently interviewed with Cohesity and encountered a challenging binary tree dynamic programming problem, which I struggled to solve optimally during the coding round.

Full Experience

My interview at Cohesity commenced with approximately 10 minutes of discussion about my current role, day-to-day responsibilities, and the systems I actively work on. This initial conversation flowed quite naturally and was very conversational.

Following this, the interviewer transitioned to a coding problem:

Interview Questions (1)

Q1
Maximum Sum of Non-Adjacent Nodes in Binary Tree
Data Structures & AlgorithmsMedium

Given a binary tree, find the maximum subset sum such that no two selected nodes are adjacent (meaning you cannot pick both a parent and its direct child).

This is akin to the "Maximum Sum of Non-Adjacent Nodes in a Binary Tree" problem, often compared to LeetCode's House Robber III.

Preparation Tips

This interview served as a significant reminder that tree problems frequently necessitate dynamic programming with multiple states. Specifically, when constraints like "cannot pick adjacent nodes" are present, thinking in terms of "include/exclude" states is crucial. It underscored the importance of consistently practicing classic patterns such as Tree DP and DFS with tailored return states. This experience highlighted key areas I needed to focus on, and I've since dedicated time to improving my proficiency in these specific problem types.

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!