Harness | 6 yrs experience | Staff Software Engineer
- Result
- Ongoing
- Experience
- 6 years
- Posted
- 21 Apr 2023
Summary
I recently interviewed at Harness for a Staff Software Engineer position, going through two technical rounds that primarily focused on data structures and algorithms.
How it went
I had two interview rounds at Harness for the Staff Software Engineer role. The first round presented a classic tree-based dynamic programming problem, and the second round involved designing a custom data structure to handle various operations on a stream of boolean values efficiently.
Questions asked (2)
- 01
House Robber in Binary Tree
Data Structures & Algorithms · Medium
Given a binary tree representing houses, determine the maximum amount of money the robber can rob tonight without robbing adjacent houses. This means if I rob a node, I cannot rob its immediate children.
- 02
Design Data Structure for Boolean Stream Operations
Data Structures & Algorithms
Given an input stream of boolean values, design a data structure that can support the following modules in optimal time:
setTrue(index): Sets the boolean value at the given index totrue.setFalse(index): Sets the boolean value at the given index tofalse.setAllTrue(): Sets all boolean values in the stream totrue.setAllFalse(): Sets all boolean values in the stream tofalse.getIndex(index): Returns the boolean value at the given index.