I had 2 phone interviews that were one-hour long each and were scheduled on the same day back-to-back.
Guidance was that these interviews will test both technical coding and design knowledge.
In phone number login flow, GrabID service has an API endpoint
/phone/otp: given a phone number, send out otp code sms message.
Now QA team wants to test this endpoint with some testing phone numbers in production but they don't want sms message sent out.
We have a config string for testing phone numbers like: "123456,200000-250000,...".
Given a phone number, check if it is a testing phone number.
For example:
config string: "123456,200000-250000"
"123456" => true
"654321" => false
"333333" => false
"234567" => true
type PhoneNumberChecker interface {
IsTesting(phone string) bool -------> Implement this
}class Dog {
public Dog mom;
public Dog dad;
// Returns true iff this and other dog are the same entity
public boolean equals(Dog other) {
// assume implemented
}
// Should return true if other and this share any ancestry
public boolean isGeneticallyRelated(Dog other) {
// Implement this function.
}
}