Maximum Value

Another “classic” programming interview question. The Question Given user input of a series of numbers, find the maximum value of said input. The Answer This question is simple if you understand the concept behind arrays (which you can see the basics of in the “Reverse a Sentence” post). The basic idea … Continue reading

Minimum Value

Another “classic” programming interview question. The Question Given user input of a series of numbers, find the minimum value of said input. The Answer This question is simple if you understand the concept behind arrays (which you can see the basics of in the “Reverse a Sentence” post). The basic … Continue reading

Reverse a String

Another “classic” programming interview question. The Question Given a random string as input, write a script which reverses it character-for-character. The Answer First off, I feel I should mention that the following is cheating! $ echo “This is a sentence” | rev ecnetnes a si sihT The equivalent BASH script: … Continue reading