Results 1 to 5 of 5
Like Tree2Likes
  • 2 Post By JosAH

Thread: Get result 100 from 123456789 by inserting + \ - between digits, backtracking

  1. #1
    JakubM is offline Member
    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Default Get result 100 from 123456789 by inserting + \ - between digits, backtracking

    On paper it is written long number 123456789. Insert between some digits signs + or -.
    So that you incurred after evaluating the expression given number 100.
    For example: 123-45-67 +89 = 100
    Write a program that finds and displays all the solutions. Use backtracking.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,434
    Blog Entries
    7
    Rep Power
    20

    Default Re: Get result 100 from 123456789 by inserting + \ - between digits, backtracking

    Cool, what can we win?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    Sierra is offline AN21XX
    Join Date
    Mar 2012
    Location
    Munich
    Posts
    297
    Rep Power
    3

    Default Re: Get result 100 from 123456789 by inserting + \ - between digits, backtracking

    Nice assignment! Good luck! :)
    I like likes!

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,188
    Rep Power
    19

    Default Re: Get result 100 from 123456789 by inserting + \ - between digits, backtracking

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,434
    Blog Entries
    7
    Rep Power
    20

    Default Re: Get result 100 from 123456789 by inserting + \ - between digits, backtracking

    That thread is closed on Stack Overflow; I'll close it here as well; we're not rentacoder ...

    kind regards,

    Jos
    Fubarable and DarrylBurke like this.
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 3
    Last Post: 10-27-2011, 05:23 PM
  2. Struts 2 error : No result defined for action / result
    By sameerk in forum Web Frameworks
    Replies: 1
    Last Post: 05-17-2011, 10:15 AM
  3. Replies: 1
    Last Post: 01-19-2011, 09:23 PM
  4. Backtracking
    By pali185 in forum New To Java
    Replies: 2
    Last Post: 12-17-2010, 01:08 PM
  5. need help with backtracking
    By Dumisan in forum Advanced Java
    Replies: 9
    Last Post: 02-17-2010, 01:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •