This post was last edited by sycstudent on 2025-09-26 12:41 Basic Information: Last year of PhD program in the Midwest (hopefully) I contacted a recruiter from JS during the conference and scheduled an HR call and interview. Position: ML Performance Engineer I heard the second interview will test CUDA kernel performance. Does anyone have any good preparation materials to share? First Round Interview Results General Coding: Observing the posts on the forum, the first round of JS interviews seems to focus more on clarity and communication. The questions mainly involved implementing certain APIs, and weren't particularly difficult. Specific Questions: https://www.1point3acres.com/bbs/thread-1117783-1-1.html Class item has: optional buyer, string seller, int price, string item_name When item 5 is available for purchase, the buyer needs to be updated. Class DataStore: update, update the item information. When sold, the buyer changes from null to buyer_name. getAll, return the information of all current items. First Question: Given a map (item_name -> Item) representing all items to be purchased, where each item contains the buyer's desired price and buyer_name. Return map(item_name -> price) representing the final transaction price. The final transaction price is the lowest price among items with the same name in the DataStore (and also lower than the buyer's desired price). Update is also required. Update DataStore It's straightforward, just write it according to the logic. Second question: After all transactions end for the day, some transactions may fail (e.g., credit card issues). Handle the following two scenarios: Scenario 1: Alice, item A, transaction price 100, transaction time 1000, transaction fails -> item A, 100 re-open to sell. Bob, item A, transaction price 110, transaction time 1010, transaction succeeds -> refund 10, and item A, 110 re-open to sell. Cathy, item A, transaction price 105, transaction time 1020, transaction succeeds -> nothing happens, because the 110 item A returned by Bob is higher than Cathy's original transaction price. Scenario 2: Alice, item A, transaction price 100, transaction time 1000, transaction fails. David, item A, bid 110, transaction time 1020, transaction fails (because it was out of stock at the time) -> charge. 100. The requirement is to return charge and refund information (buyer_name, refund/charge_amount) to all buyers. The question isn't difficult; the basic logic is to scan the transaction records chronologically, record any failed transactions, and compare them with subsequent successful transactions. It's quite tedious and requires communication with the interviewer on several details. How to obtain the transaction records in chronological order? How to know David's situation in scenario 2—that is, how do we know there was a buyer but the transaction wasn't sold? Scenario 2: If David's transaction is before Alice's in the chronological order, is a charge still needed? The interviewer said no. My answer to this question wasn't perfect, so I was timed out. She then asked me to ask her about JavaScript. Overall feeling: Not particularly difficult, but communication and clarity are crucial. I don't know the result yet. I haven't been on the forum for a long time, and I've run out of points. I hope you guys can give me some! Please!