I understand the concept of bubble sort and have no trouble implementing it, but I can't grasp the concept of doing it for 2D array. I've googled for some resources but I was unable to understand those codes.
So let's say I have a 2D char array with words (maximum of 7 char) from reading a text file which I figured out so far.
# 0 1 2 3 4 5
0 h e l l o
1 a x e
2 h e l p
3 n i c e
4 c a m p e r
5 o c e a n
.
.
If I am to sort the first char of each word, at what point would I have to consider sorting of the 2nd char? Can you guys give me some hint or pseudo code to help me out? Thanks.