programming/math crew: help me solve this problem

Discussion in 'OT Technology' started by s2k, Feb 22, 2010.

  1. s2k

    s2k OT Supporter

    Joined:
    Oct 8, 2002
    Messages:
    46,932
    Likes Received:
    18
    Location:
    corn field, iowa
    in c#, but the language shouldn't matter, i just need help figuring out the algorithm for solving it
     
  2. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    http://www.gamedev.net/community/forums/topic.asp?topic_id=515491
     
  3. GOGZILLA

    GOGZILLA Double-Uranium Member

    Joined:
    Jan 16, 2003
    Messages:
    10,760
    Likes Received:
    3
    Location:
    Plantation, FL
    is this for a job interview?
     
  4. s2k

    s2k OT Supporter

    Joined:
    Oct 8, 2002
    Messages:
    46,932
    Likes Received:
    18
    Location:
    corn field, iowa
    no its for class, but i've heard some companies uses it as a pre-interview "test"
     
  5. CodeX

    CodeX Guest

    Brute force it is the easy route.

    Enumerate the available operators (including none) and iterate through every possible value that can be formed with those enumerations and the original digits.
     
  6. CodeX

    CodeX Guest

    But... if this was for a job interview the first thing you should determine, and ask if not apparent, is what the application of this would be to decide whether to optimize the solution for speed or memory footprint, as well as possible re-usability.

    For example, you could construct a tree structure that would take a relatively long time to come up with a single answer, but after the tree is constructed in memory answering any similar subsequent question would be almost instantaneous (just a matter of parsing the tree and making a < or > determination at each node)
     
  7. GOGZILLA

    GOGZILLA Double-Uranium Member

    Joined:
    Jan 16, 2003
    Messages:
    10,760
    Likes Received:
    3
    Location:
    Plantation, FL
    LOL I asked because I was just reading about job interview questions relevancy and then read this thread.
     

Share This Page