Loading...
Showing 1-10 of 16 forum items
I was asked to implement a SnowCal language interpreter.
**Coding Question:** calculate the total amount of tax paid given a 2D array of tax brackets and an income.
### Round 1: Basic Solution (Hash Approach) **Question:** Implement recipe matching using a rolling hash strategy. --- ### Round 2: Low Memory Constraint **Question:** Implement recipe matching using O(1) extra space. --- ### Round 3: Streaming Data **Question...
**Coding Question:** Determine if a number is a happy number based on the provided rules.
**Coding Question:** I was given a binary tree and a list of node IDs to delete. After deleting the nodes, the remaining nodes form a forest. I needed to find the maximum depth of any tree in the resulting forest. ---
### Round 1: Finding the First Error (Binary Search) **Question:** Find the first error log in a list of logs using binary search, given that once an error appears, all subsequent logs are also errors. --- ### Round 2: Finding All Affected Services (Graph BFS/...
### Round 1: Coding **Question:** Find all anagrams of string `p` in string `s`. ---
### Round 1: Static Input **Question:** Implement a function that acts like a simple grep tool to search for lines containing a specific target string, printing the line and a specified number of lines before and after it. Duplicates should be avoided, and the...
### Round 1: Nearest Cake Distance **Question:** Given a binary array and a starting index, find the shortest distance to the nearest cake (1) from the starting position. What is the time and space complexity? --- ### Round 2: Global Matching **Question:** Giv...