Confluent Interview Questions
Showing 11 questions
Design a data structure that acts as a Least Recently Used (LRU) cache. Implement methods to get and put key-value pairs, evicting the least recently used entry when the cache is full.
#1. LRU Cache
Design a key-value store that supports storing values with timestamps. You should be able to retrieve the latest value for a key that's less than or equal to a given timestamp.
#2. Time Based Key-Value Store
Determine if a given 9x9 Sudoku board is valid. Check if each row, column, and 3x3 subgrid contains the digits 1-9 without repetition.
#3. Valid Sudoku
You are given a set of grain piles and a number of chickens. Determine the minimum time required for all chickens to eat all the grains, where each chicken can eat from only one pile at a time.
#4. Minimum Time to Eat All Grains
Fill in the empty cells of a partially completed Sudoku grid according to the game's rules. The goal is to complete the grid so that each row, column, and 3x3 subgrid contains all digits from 1 to 9 without repetition.
#5. Sudoku Solver
Find all unique combinations of numbers from a given array that sum up to a specific target value. You can use the same number multiple times.
#6. Combination Sum
Design a system to manage user authentication tokens. Implement features to generate, renew, and count unexpired tokens, while handling token expiration.
#7. Design Authentication Manager
Given an array and a target number K, count the number of subarrays whose median is equal to K. Remember that the median is the middle element after sorting.
#8. Count Subarrays With Median K
Determine if an input string matches a given regular expression that supports '.' and '*' characters. The '.' matches any single character, and '*' matches zero or more occurrences of the preceding element.
#9. Regular Expression Matching
Implement a debounce function that limits the rate at which a function can fire. You should only execute the function after a certain amount of idle time has passed.
#10. Debounce
Decode a chemical formula to count the number of atoms of each element. The formula may contain nested parentheses and numbers indicating counts.
#11. Number of Atoms