POW Answer – Unnamed Function #2

This answers the Problem of the Week from May 8, 2012. The identity of this well-known computer science function is the binary search. The following is the same code from before with the variables more properly named: To tell you the truth, after using the real names in the function Read more…

POW – Unnamed Function #2

This Problem of the Week involves determining the identity of a well-known computer science function and renaming the variables so that the definition makes more sense.  The following is the function definition (obfuscated by me): What I can tell you is that this function takes in a sorted array (in ascending order) as the Read more…

POW – Fill In The Blanks In SQL

One of the things I always find interesting is the fact that DBAs almost always use some type of auto-increment method in order to generate unique IDs for records. Sometimes, though, you may have a table in which you don’t want to use the default method of generating the next Read more…

POW Answer – Fixing Compilable JavaScript Code

The following answers the Problem of the Week from May 14, 2012: At first glance, it may seem that the following would be the solution: Unfortunately, the above results in true being returned. In order to get false to be returned, you could do the following: Even though the result Read more…

POW – Fixing Compilable JavaScript Code

Many JavaScript/JScript developers use Google Closure Compiler to compile their code. Even though this tool is a great way of minifying JavaScript code, believe it or not, it doesn’t always work (at least as of May 14, 2012). The following JavaScript code works fine when you run it without being Read more…

POW Answer – 0.999999 Repeating Equals One?

The following answers the Problem of the Week from May 7, 2012: One of the simplest ways to prove that 0.999999 = 1 is by doing the following: 0.333333 = 1 / 3 3 × (0.333333) = 3 × (1 / 3) 0.999999 = 1 As shown above, since it Read more…

POW Answer – Differences In Languages

This is the answer to the Problem of the Week that was posted on April 30. The desired answer is 0. The reason is because “11” in binary is actually equal to 3. Therefore 3 – 3 = 0. On the other hand, you could use the following table to Read more…

POW – 0.99999 Repeating Equals One?

How can you prove or disprove that 1 = 0.999999…? The answer to this Problem of the Week can be found here.