The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

Entry #100114 - WTFCalculator

Last post 06-11-2007 12:09 PM by Alex Papadimoulis. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-11-2007 12:09 PM

    Entry #100114 - WTFCalculator

    By viewing the test case input as a string and sorting them it became clear that it would be possible to determine the correct output from only the first 2-4 characters of the string. This is optimal as it achieves a working (passes test cases) calculator with minimum effort even though it fails for edge conditions (anything other then a test case). Also the users interface is highly unfriendly - grouping the numbers and operators into arbitrary categories that presumably have no relevancy to the user.
Page 1 of 1 (1 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems