Dynamic Programming

This is a discussion on Dynamic Programming within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm new in the forum. I've to give a test in the college and one of the topics is ...

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    1

    Question Dynamic Programming

    Hi, I'm new in the forum.

    I've to give a test in the college and one of the topics is dynamic programming algorithms in c++. But i have no idea how to resolve this kind of problems even i read a lot about the subject. any recomendations of how to solve this problems??

    thanks.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,013
    Store the calculated results in a vector or map or something. It's not harder than that.
    Next time you're going to calculate the same thing, it's already saved somewhere, so fetch it and save the calculation.
    Try fibonacci numbers, for example. They're a good exercise to apply this technique.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,308
    There are dozens of different things you could do, listed here
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 12-23-2009, 01:55 PM
  2. Replies: 4
    Last Post: 11-02-2006, 11:41 AM
  3. Identify dynamic IP address of network device
    By BobS0327 in forum Tech Board
    Replies: 2
    Last Post: 02-21-2006, 01:49 PM
  4. operator overloading and dynamic memory program
    By jlmac2001 in forum C++ Programming
    Replies: 3
    Last Post: 04-07-2003, 12:51 AM
  5. Dynamic memory confusion
    By ripper079 in forum C++ Programming
    Replies: 5
    Last Post: 11-04-2002, 06:15 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21