Merge In Between Description Consider two linked lists, list1 and list2 , and two integers, i and j . Replace the nodes from the i th to the j th positi…
8-Puzzle Description The 8 Puzzle is a sliding block game played on a 3×3 grid containing 8 numbered tiles (from 1 to 8) and one empty space represented…
You and a friend have received a special gold chain as a gift. The chain links each have an integer weight, not necessarily the same. You and your frien…
Shopping Cart Billing An e-commerce company is currently celebrating ten years in business. They are having a sale to honor their privileged members, th…
Given a string s containing only lowercase English letters and parentheses, reverse the strings in each pair of matching parentheses from the innermost…
What is the log order of the code above? Question description async function async1() { console.log(‘async1 start’); await async2(); console.log(‘async1…
Please implement a Python function that takes a non-negative integer argument n as input, and it produces a list of all binary strings with length n suc…
Assume you work at a video streaming service and are asked to build a solution that will recommend videos to users on their home page. How would you app…
There are a total of numCourses courses you have to take, labeled from 0 to numCourses – 1 . You are given an array prerequisites where prerequisites[i]…
Given a mapping of teams to their data access patterns, and a list of deleted data files, determine which teams are impacted. Build a system that can: P…
Compare two strings and determine whether they are anagrams of each other. 这道题的核心是判断两个字符串是否由完全相同的字符组成,只是顺序不同。最常见的做法是先比较长度是否一致,如果长度不同就一定不是 anagram;然后用哈希表…
Design a rate limiter for an API. Discuss the functional requirements, non-functional requirements, API design, high-level architecture, and data model…
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…