★Оффер · $8 900 / мес
15 вопросов · 1 ч 42 мин · финал · сложность высокая · ОАЭ
О чём разговор
Combat SDK in Go, snake poison over time, e-commerce cart, stock locks and checkout flow
Этапы
- 1Лайв-кодинг
- 2Системный дизайн
- 3Финал
- Оффер
Все вопросы
- 03:10
Make sure the barracuda can attack the human and the shark can attack the human, then show the human's remaining life and whether they are dead.
Код - 29:55
You defined an IsDead method, but I never see you call it. Why?
Код - 33:59
If we add a new attacker, such as a tiger, what will happen to this code?
Код - 35:16
Why do we need a separate attack function for each individual creature instead of a common attacker type?
Код - 40:29
A new requirement: the snake has poison. How would you integrate this into the SDK? You don't need to write code, just the idea or pseudo code.
Код - 43:59
What happens if the snake bites two different targets, and how do you track the poison state?
Код - 46:08
Imagine a snake bit you in real life. What happens to you? Walk me through it step by step.
Кейс - 48:24
Design an e-commerce system for Black Friday with a cart, inventory, promotions and an external payment gateway.
Системный дизайн - 52:12
How would you prevent race conditions when inventory is deducted?
Системный дизайн - 1:01:55
What API endpoints do you need for the cart and checkout?
Системный дизайн - 1:20:15
What is the sequence between the payment gateway, our database and the message queue during checkout, and how is the response handled?
Системный дизайн - 1:22:02
Do you have experience with a payment gateway before?
Поведенческий - 1:27:43
After we send the message and they say yes, the transaction was approved, what happens in our system?
Системный дизайн - 1:32:24
How does adding a product to the cart affect our inventory?
Системный дизайн - 1:33:51
Why not lock the item when it is added to the cart, and how do you verify stock at checkout?
Системный дизайн
Ключевые моменты
- 01:33
Task brief: combat SDK for creatures
- 29:55
Code review: IsDead is never called
- 40:29
New requirement: snake poison
- 48:24
Move to e-commerce system design
- 1:33:51
Inventory locking at checkout
- 1:37:54
Company context: legacy Python and MySQL platform moving to Go
Отрывок из разговора
And what happens if snake bites two different targets?
two different targets well i guess the most straightforward way is that each of the like each of the targets it should like call the take poison method uh I guess that's
the way it's gonna be but how do you track them how do I track them yeah because after you apply the poison you need to track right well
i guess i guess it gets a bit more complicated because uh now we should have like some sort of state that we can you know track track and we have to stir this sort of state somewhere uh like uh i mean i guess it's leaning more to like you k
Что вынести
Two technical rounds. The first was live coding in Go: modeling a combat SDK for creatures with interfaces, error handling and a poison effect that ticks over time. The second was a system design of an e-commerce core for Black Friday: cart, inventory, promotions, an external payment gateway, locking and sharding. According to the folder, an offer was received.
В записи сумма не называется; интервьюер упоминает, что в Дубае доход не облагается налогом.
Разбор собран по записи разговора.
Расшифровка
Nice to meet you. You can call me name, so it's gonna be easy for you. So nice to meet you and very welcome for the interview. For this interview, we're gonna have the 90-minute session for the interview. I hope you're already aware for the long meeting. So first session going to be coding challenge. You will write the code there and we split it to two parts. The first part is going to be 30 minutes for write the code. And then we're going to have 15 minutes for Q&A and new requirement as well. And the second session is going to be 40 minutes for system design challenge. For the coding challenge, I will need you to share your screen. So that's for ensure there's no AI running in the background. And you can use any IDE you are comfortable with, but just to make sure you disable the co-pilot or any running AI that will help you for write the code. Sound good? Any questions before that?
oh yeah sure just let me create you know an empty project you know for the interview okay
Okay, let's see your screen now. Let me share this screen as well. It's going to be the requirement. Okay. So we have the requirement saying that we would like to create the game SDK. This SDK is going to be like very similar to the library. So it's going to be shared rapidly saying that these shared library, they are any developers in our organization that can use this to serve the business side. So to serve the business sites, they might have several implementation. It's very various on their site. But for our site, we have the rules that it cannot break the rules if they're going to implement this. So that's why we call it SDK. The requirements have been included basically three creators right now. The first creature is balacuda, second one is shark, and the third one is human. The difference is on the creature side, we have most of them, they have bite force, right, balacuda and shark, but human cannot bite.
So this is like the requirement that we would like to implement. And then after that, we would like to specify the testing. So we would like to know that our SDK can provide these kind of functionalities. So we would like you to drive into Compact Flow. Simple. Just make it simple. Make sure that we provide the barracuda can attack the human. Sharp can attack the human. And then we show the human status. us for each now please make sure you can print the human remaining life so that we understand how the code working okay for the life point if there's less than zero um it should determine that the human status dead or something that is our expectation um there's no need to be production grade so just to make sure that you have sorted out in the way in the correct way um and that's that's only expectation any any question before we start
let me see let me see uh okay so we have our uh game in the game it's important base command system so we have like three creatures work with a shark and human um yeah that's right and um work with a text human shark it is human show the human status so i assume we can do this in a like one file in just one you know main.go not need to no need to you know create like additional make it just keep it simple for keep it simple for now um i see i see and uh in the end we should like provide some sort of uh like deep you know demo that you know this whole thing works uh just to like demonstrate like this combat flow that you know we can see here barcode attacks human shark attacks human show the human status simple display each turn results um all right if the life lines are below zero to return that the human is dead um all right all right i see i see i see um i mean the task is quite clear to me um one thing that kind of i guess needs some attention is the fact that this is like a game you know sdk and you know this like you know word SDK whenever you know I hear SDK it's all about making something you know that's going to be used by you know other teams so you know it should be like you know portable and stuff
Похожие собеседования
Wildberries
Golang Developer
Ускорить код с горутинами с 40 до 10 мс, GC, escape analysis и планировщик
Нужно ускорить код, который сейчас выполняется примерно за 40 мс, до 10 мс, и возвращать первую возникшую ошибку.
CoinsPaid
Golang Developer
Планировщик Go, устройство map, worker pool, PostgreSQL-блокировки, Kubernetes, Outbox
Как устроен планировщик Go и какие очереди горутин в нём есть?
Магнит
Golang Developer
Go-типы, слайсы, мапы, бинарный поиск, индексы БД, ACID, блокировки, CAP, промокоды
С чем связан поиск нового места работы, почему ты ушёл с предыдущего и чего ждёшь от нового?
Remotely
Golang Developer
Backend test-task architecture, React request cancelling, C# to Go, tech debt, Kubernetes
How did you choose the backend architecture for the coding challenge, and why?