Category Archives: Code

Just a post about code

OK, it is time for my unofficial weekly coding challenge.  This time I am going to do a fairly simple challenge involving anagrams.  If you read the definition on Wikipedia it states that an anagram is, “a word or phrase formed by rearranging the letters in a word or a phrase, typically using all the letters […]

This entry was posted on Tuesday, October 31st, 2017 at 6:00 pm

 Reverse polish notation is a system in which the operators follow the operands.  For example 2 3 + would mean that 2 and 3 should be summed together. It does not need any parenthesis as long as the operators work on a fixed number of operands. Anyways, the coding challenge today is to create a […]

This entry was posted on Tuesday, October 24th, 2017 at 6:00 pm

Problem: Write a program that first takes an integer N giving both the X and Y size, and then N number of lines. Each line will contain N space-delimited characters, 0, 1, or 2. These characters represent altitude on the map. Zero means water. First, find the bodies of water. A body of water is […]

This entry was posted on Monday, October 16th, 2017 at 6:00 pm

Problem: Let a mirror be a contiguous group of elements in an array such that somewhere in the array the same group appears in reverse order.  For example, the largest mirror section in {1,2,3,8,9,3,2,1} is length 3 (the {1,2,3} part).  Write a function that will return the length of the biggest mirror in the array. […]

This entry was posted on Monday, October 9th, 2017 at 5:00 pm