Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Search Forums
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Showing results 1 to 5 of 5
Search took 0.01 seconds.
Search: Posts Made By: Rod Stephens
Forum: BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer March 21st, 2013, 03:50 PM
Replies: 10
Views: 1,772
Posted By Rod Stephens
I think the basic idea will help. The method...

I think the basic idea will help. The method recursively calls itself once for each possible path up the pyramid and then uses the best total it finds from those paths. Hopefully you can adapt it for...
Forum: BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer March 21st, 2013, 03:30 PM
Replies: 10
Views: 1,772
Posted By Rod Stephens
Gotcha. Here's the basic idea. // Find...

Gotcha.

Here's the basic idea.

// Find the best total from entry [x, y] to the top.
BestTotal(int[,] array, int x, int y)
{
// Start with the value from this entry.
int total =...
Forum: BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer March 21st, 2013, 03:08 PM
Replies: 10
Views: 1,772
Posted By Rod Stephens
Are you trying to find the best path from the...

Are you trying to find the best path from the bottom to the top where each entry in the row above must have X coordinate differing by at most 1 from the row below?

If so, you can write a recursive...
Forum: BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer March 21st, 2013, 02:50 PM
Replies: 10
Views: 1,772
Posted By Rod Stephens
I think you're going to have to give a little...

I think you're going to have to give a little more detail. For example, search the columns to find the one with the largest total? Find a path via adjacent entries from the upper left corner to the...
Forum: BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer March 21st, 2013, 02:34 PM
Replies: 10
Views: 1,772
Posted By Rod Stephens
Do you mean the total of all entries in the...

Do you mean the total of all entries in the array? Either loop through it and add the values up, or look at LINQ. It can probably do this for you.
Showing results 1 to 5 of 5

 


All times are GMT -4. The time now is 10:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.