Hook

Their other posts in the index, biggest breakout first.
Can you pass a software engineering interview question? This is a question I've been asked. I'm going to ask one component of the question, and if you get this one component right, then you probably have the question right. So you have the game Battleships. If you don't know what it is, it's basically like you have ships on the ocean. The opponent picks specific places in a matrix where they might think your ship is. If they hit your ship and it hit all pieces of your ship, your ship goes down, you lose the game. Or vice versa, you win the game. So the question is, how do you represent all these ships in memory? So like what data structure do you use in order to represent the battleships? Now understand, efficiency is key. How you represent the data will then determine how you render the data and how you access and change the data. There is a very inefficient way to represent this and there is a very efficient way to represent this. And you only pass if you pick the efficient way.