Can someone show me algorithm so i can sort array like this?
Picture
Michael27
29
Newbie Poster
Recommended Answers
Jump to PostWhy not just sort the linear array by an algorith of choice (bubble, quick, etc.) then fill the 2-D array like that?
If you hate the temporary array, then just apply selection sort and swap with the indexes starting from
rr[Len/2 -1][Len/2 -1]
Jump to PostOk, I mess around a bit with the code you want to, and this is what came out.
I hope you like it:public partial class Form1 : Form { DataTable table; public Form1() { InitializeComponent(); //I will create this code in form`s constructor, so you will …
All 7 Replies
nbaztec
45
Posting Pro in Training
thines01
401
Postaholic
Team Colleague
Featured Poster
Mitja Bonca
557
Nearly a Posting Maven
Mitja Bonca
557
Nearly a Posting Maven
Michael27
29
Newbie Poster
Michael27
29
Newbie Poster
Mitja Bonca
557
Nearly a Posting Maven
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.