The Confluent coding assessment contained two questions in 75 minutes and did not require the camera to be turned on. The first problem was a straightforward dynamic-programming question similar to Coin Change II, while the second required deriving an efficient mathematical formula for a sum involving modulo operations over all ordered pairs.
Interview Details
Question 1 — Count Ways to Reach a Target Sum
Given two integers:
total
k
count how many different ways total can be formed using integers from 1 through k. The result can be very large, so return it modulo 1000000007. For example: total = 8, k = 2. There are 5 valid combinations: