Yeap. I believe there is a different mentality when doing code interviews. The mentality is that we live in stone age and only the most trivial code is available in the language. So no fancy methods like pop or push.
Worse was that they acknowledged that pop would have been great for removing the last element. Just that I was not allowed to pass it an index because languages like java didn't accept it. So it was that it couldn't be done in language that is not used at that company so we won't let you do it in language that is used at that company.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yeap. I believe there is a different mentality when doing code interviews. The mentality is that we live in stone age and only the most trivial code is available in the language. So no fancy methods like
pop
orpush
.Worse was that they acknowledged that pop would have been great for removing the last element. Just that I was not allowed to pass it an index because languages like java didn't accept it. So it was that it couldn't be done in language that is not used at that company so we won't let you do it in language that is used at that company.