10 questions · from 6 interviews

Harness interview questions

Every question candidates reported from their Harness interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.

Harness coding and DSA questions

  1. 01

    Streaming Ingredient Cooking Decision

    There are three ingredient types: "fat", "fib", and "carb". You receive an integer n representing the number of days and a list of strings indicating the ingredient that arrives each day. You must output an array of 0s and 1s (one per day) indicating whether…

    From Harness | Senior Software Engineer | Round 1 (DSA)

  2. 02

    GCD Sort of an Array

    I was asked a hard LeetCode problem related to GCD Sort of an Array. The specific problem can be found at the provided LeetCode link.

    Hard · From Harness Interview Experience

  3. 03

    Evaluate Tree with AND/OR/LEAF Nodes and Interval Values

    Given a tree with nodes as either "AND", "OR" or "LEAF". For Leaf nodes, there are intervals given like [4,5] or [6,7]. You have to give the final calculation of the tree nodes. Example: "AND" / \ [2,3] "OR" / \ [3,7] [11, 21] The final answer is {3}

    From Harness Senior SDE Interview

  4. 04

    Implement Trie

    Implement a Trie (prefix tree) data structure in TypeScript.

    From Harness Interview Experience | SDE I

  5. 05

    Render Folder Structure Tree to HTML

    Given a text representation of a folder structure tree, render it into an HTML format using list elements. Input |- A |- B |- C |- D Output - A - B - C - D

    From Harness Interview Experience | SDE I

  6. 06

    Range Sum of BST

    Given the root of a binary search tree, and two integers low and high , return the sum of values of all nodes with a value in the inclusive range [low, high] .

    From Harness | SDE (intern) | Banglore | March 2023 [Selected]

  7. 07

    Merge Intervals (or similar)

    A problem similar to merging overlapping intervals. The standard problem asks: Given an array of intervals where intervals[i] = [start i , end i ] , merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the…

    From Harness | SDE (intern) | Banglore | March 2023 [Selected]

  8. 08

    House Robber in Binary Tree

    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.

    Medium · From Harness | 6 yrs experience | Staff Software Engineer

  9. 09

    Design Data Structure for Boolean Stream Operations

    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 to true . setFalse(index) : Sets the boolean value at the given index to false…

    From Harness | 6 yrs experience | Staff Software Engineer

Harness system design questions

  1. 01

    Design and Implement an E-commerce Application

    Give end to end functioning code of a Spotify type app. Have it create store with products with quantity. Place orders.

    From Harness Senior SDE Interview

Harness interview questions FAQ

What questions are asked in Harness interviews?

Candidates reported 10 distinct questions across 6 Harness interviews. 9 coding and DSA questions, 1 system design questions.