Write a function that takes in a string and decreases all monetary values in the string by 15%. Examples: // “I spent $100.00 on Amazon this week.” ->…
TikTok is hosting a livestream event with popular creators. Each creator has submitted their preferred start and end times for their part in the livestr…
Write a function to accept two arguments: Arg1 being an integer array and Arg2 being an integer. Find all the pairs from Arg1 whose difference is equal…
Given an array of data, where each entry is an object with id and value keys, and an object of ids, where each key is the name and value is either a sin…
Debugging: Dasher Picking for Deliveries Description We have some code that attempts to assign a random dasher to a delivery: There is a class Dasher th…
Given a set of lockers that can be one of three sizes: s , m , l , and boxes that can be one of three sizes: s , m , l , implement the assignLockerToBox…
We’ve provided a labeled training set for a fraudulent booking model. Each record is a historical Airbnb booking and its corresponding characteristics (…
Given a sequence of integers and an integer total target, return whether a continuous sequence of integers sums up to target. Example: [1, 3, 1, 4, 23],…
Implement bill_for(month, plan, users) to calculate the monthly bill for a customer. The bill depends on how many users are active during the given mont…
Given a 2-dimensional 2-color bitmap, write a function to implement flood fill , e.g. the bucket in MS Paint. Assume that the fill will only fill white…
Find all palindromes in a string. 这道题要求在一个字符串中找出所有回文串,核心通常是枚举每一个可能的回文中心,并向两边扩展检查,这样可以同时处理奇数长度和偶数长度的回文。也可以结合动态规划或 Manacher 算法来进一步优化,但面试中最常见、最稳妥的方法是中心扩展:对…
Given k calendars, a meeting duration, and bounds, return a list of possible time slots where the meeting can be scheduled. Input timeout: 3 Input log:…
You are working on a project that has to implement a new ship-discovering technology. You are provided with the function: struct Point { const int x; co…
Parse log file. Count the number of errors and group them by time. 这道题的核心是先逐行解析日志,再从每一行中提取错误标记和时间信息,最后按时间维度进行分组统计。通常可以用哈希表或字典保存每个时间段对应的错误数量,边扫描边累加,避免重复遍…
You work on a project that has to implement a new ship discovering technology. You are provided with the following function: struct Point { const int x_…
You are given an integer array bills representing bills of different denominations and an integer amount representing a total amount of money. Return th…
Amazon frequently offers product bundles to customers, where multiple related products are combined and sold together at a discounted price. The goal is…
Implement a function that takes numbers a and b in string form and returns the result of a * b as a string. The input can only contain digits [0-9] or a…