Posted by mpweiher 22 hours ago
That's why in so many industries they prefer to hire engineers and OR grads and teach them python, than hire SWE and teach them modeling
coins = [100,50,25,10,5,1]
change = 1234;
result = [0,0,0,0,0,0];
for(i=0:i<coins.length;i++){
while(change>coins[i]){
result[i]++;
change-=coins[i];
}
}
//[12,0,1,1,4]
Coudnt help myself sorry function coin_change(change) {
const coins = [25, 10, 5, 1]
for (const coin of coins) {
const n = change / coin | 0
change -= n * coin
console.log(coin, n)
}
}
coin_change(25+10+5+1)
The reason was that aboint 70% of candidates couldn't write a simple loop -- to filter those out. The actual solution didn't matter much, I gave a binary decision. The actual conversation matters more.
Somehow someone figured that giving harder problems should result in better candidates. Personally, despite having passed most of the tests I've been subjected to, I don't see the connection.
> We can solve this with a constraint solver
Ok, using your favorite constraint solver, please write a solution for this.
> [half an hour later]
Ok, now how would you solve it if there was more than 100 data points? E.g. 10^12?
https://pierre-flener.github.io/research/NordConsNet/NordCon...
Leetcode requires a very different set of skills from software engineering. Software engineering isn't so much about solving puzzles as it is about making good decisions. It's about knowing what's important and knowing where the boundaries are. It's about anticipating problems in their broadest form; creating just the right amount of flexibility and allowing the solution to solidify as your understanding of the problem deepens.
> contractor
Do FAANG hire contractor in India?