top of page
Plain.jpeg

Code

Palindrome Test

I don't remember the exact criteria for this, but I had to detect palindromes up to a certain size. Running through the various things I knew at the time to solve all the efficiency issues that arose was real fun and a real challenge.


I remember my brain being completely obsessed with this problem all day because I had something like 24hour to complete this assessment and I was stuck on this last question and had to go to class .

​

​

Palind.PNG

This was a great problem solving question because it allowed you to throw everything you know about programming from different angles at this, and there is no one solution.

​

I struggled the most with big data types, because classes never really get into anything above an int.

​

I ended up getting this run time down to 4 seconds for all 7 digit #s

Big Takeaway

Don't use strings because of the immutability, Use the smallest needed primitive possible for space but account for overflow. For me that was an unsigned long because I did not need negative numbers. Always break when there's no point continuing

bottom of page