Category: String coding problem# Question You are building a simplified card game where each player has a hand of cards and the higher-rated hand wins. Each hand contains exactly...Input: String Output: Computed result
codingHardVerified Question#2
2. [AI Enabled Coding] Design Logger
Category: Array coding problem# Question You need to design a logger library for a new application. The design should be able to allow us to easily add future loggers, like a db...Input: Array Output: Printed output
codingMediumVerified Question#3
3. [AI Enabled Coding] Food Delivery Company
Category: String coding problem# Question You are building a driver payment system for a food delivery company. The accounting team needs to track how much money is owed to drivers...Input: String Output: Integer
codingHardVerified Question#4
4. [AI Enabled Coding] Rule Evaluator
Category: String coding problem# Question You need to build a rule evaluation system for a corporate credit card platform. Managers should be able to create rules that enforce...Input: List Output: Computed result
codingHardclosure#1
1. [OA] Debounced Function — Implement a debounced search function for Rippling's employee directory
When users type into the search box of the employee directory, we want to provide suggestions after they stop typing for a short period to improve user experience. Problem statement: Implement a function debounce that takes a function func and a delay in milliseconds wait. It should return a new function that, when invoked repeatedly, will only invoke func after wait milliseconds have passed since the last time the returned function was invoked. Example 1: Input: const search = debounce((term) => console.log(term), 300); search('John'); search('John Doe'); Output: // waits until 300 ms after the last call and then prints 'John Doe' Example 2: Input: const log = debounce(() => console.log('Hello'), 1000); log(); log(); log(); Output: // waits 1000 ms to log 'Hello' once only Constraints: - wait will be a positive integer and 0 < wait <= 1000.
codingMediumclosure#2
2. [OA] Closure — Create a dynamic form state management for Rippling's onboarding process
Rippling needs an efficient way to manage dynamic forms where the number of fields can change based on user input. This requires maintaining state across various form components. Problem statement: Implement a function createFormManager that returns an object with methods to handle the state of form fields. The object should have the following methods: - setField(name: string, value: any): void - Set the value of a field. - getField(name: string): any - Get the value of a field. - getAllFields(): { [key: string]: any } - Get the values of all fields. Example 1: Input: const form = createFormManager(); form.setField('email', 'test@mail.com'); Output: form.getField('email'); Explanation: Returns 'test@mail.com'. Example 2: Input: form.setField('age', 30); Output: form.getAllFields(); Explanation: Returns { email: 'test@mail.com', age: 30 } Constraints: - 1 <= name.length <= 100 - value can be of any type, but must be a simple value (string, number, etc.).