Algorithm - how to return an item from a table to a list of

Ask for help with your homework/assignments in this forum!

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Algorithm - how to return an item from a table to a list of

Postby hulala » Sat Mar 17, 2012 10:42 am

Please help me~~
How to write algorithm for a table with m rows and n columns, and the item in table , return its position in the corresponding list formed by joining the rows together. Eg. there is a item in (1st row, 1st column) return the item to position 1. item in (1st row, 2nd column) , return its to position 2...
hulala
 
Posts: 2
Joined: Sat Mar 17, 2012 10:27 am

Re: Algorithm - how to return an item from a table to a list of

Postby exomo » Sat Mar 17, 2012 12:12 pm

I don't understand what exactly you want.
For an Element at row i, column j, it is at position (i * n + j) when you have all the rows in one row.
Who needs a signature anyway.
User avatar
exomo
 
Posts: 881
Joined: Fri Sep 26, 2003 12:30 pm
Location: germany->baden


Return to Homeworks

Who is online

Users browsing this forum: Google [Bot] and 1 guest