Home > Back-end >  About sort coding (encountered in the actual work)
About sort coding (encountered in the actual work)

Time:10-22


Good Java bosses! I work in a excel business module processing,
Just want to see picture of the 1, starting from 1 to sort, and they need the head-tail, which means that label 1 (is the starting point) has been set, ordering 2 label must be in position and 1 recent choreography (box for need of area), to coordinate the position of 4 to 3 two, and so on,
I extend according to Dijkstra algorithm, after the sorting can not meet the job requirements, as shown in the figure below

Should have bosses, take a look at how to layout, request to teach teach!!!!!!

CodePudding user response:

This algorithm looks complicated

CodePudding user response:

reference 1st floor KeepSayingNo response:
the algorithm looks complicated

?? It looks really complicated!!!!!!

CodePudding user response:

Didn't see what laws, and specific what to do??

CodePudding user response:

What usually used, binary tree, the trigeminal tree,,,, and so on, what rule to show you this?

CodePudding user response:

41-44 than 41 and 42 of the close, you recently is what standards? And no matter what the rules are also a two-dimensional array traversal problem, how even the algorithm algorithm out?

CodePudding user response:

It looks very complicated, I didn't understand the rules

CodePudding user response:

The serial number of the generation and continuity have no obvious regularity, at least I didn't see it, that you first look at the law to do development

CodePudding user response:


How to ask for the last position six here not recently the standards and rules too hasty

CodePudding user response:

Seems very complicated!

CodePudding user response:

Bosses, rule is that the sort must end to end, number has been shown in figure 1, starting from 1 down times, is the one on the right side of the 1, 2, 3 is the second on the right side of the two, then the problem comes, 4 below 3 second, five on the left side of the 4 a, 6 on the left side of the 5 second, on the left side of the 6, 9, 7 with the rules of end to end, and reasonable order

CodePudding user response:

refer to the eighth floor weixin_50923107 response:
how to ask for the last position six here is not the recent standards and rules too hasty

This is a bit like a snake, you said 6 distance 1 recently, so how to schedule 1 to the right of the grid?

CodePudding user response:

Best to clarify some rules, 16 near 6, 6 next is to far, 7, 6 line of this more clearly

CodePudding user response:

write diary refer to 12 floor of the Yangtze river water response:
best to clarify some rules, 16 near 6, 6 next is to far, 7, 6 line of this have to clear some

This is to ensure the whole line sequence data first, then go to the next line, but a single line if two lattice distance too far, my colleagues and I agreed that, more than ten grid just jump straight to the next line sorting, first position to the next line sorting from the bank's position calculated from big to small was growing up, so that end-to-end principle is to comply with!

CodePudding user response:

This simple, is actually very simple algorithm can be achieved

CodePudding user response:

11 reference Code for response:
Quote: refer to the eighth floor weixin_50923107 response:

How to ask for the last position six here not recently the standards and rules too hasty

This is a bit like a snake, you said 6 distance 1 recently, so how to schedule 1 to the right of the grid?
the combination of the snake and sudoku

CodePudding user response:

write diary refer to 12 floor of the Yangtze river water response:
best to clarify some rules, 16 near 6, 6 next is to far, 7, 6 line of this have to clear some

I see what you mean, may I express don't quite understand, sort code to ensure one line grid, but there is one case can consider to skip to the next line sorting, bank is a line in the two are far apart, my colleagues and I agreed that is more than ten grid is not considered directly into the bank the next line,

CodePudding user response:

On the 14th floor rui-heng wang
reference response:
this simple, is actually very simple algorithm can achieve

  I think is very simple,

CodePudding user response:

reference Code for reply on 16th floor:
Quote: refer to write diary 12th floor of the Yangtze river water response:
best to clarify some rules, 16 near 6, 6 next is to far, 7, 6 line of this have to clear some

I see what you mean, may I express don't quite understand, sort code to ensure one line grid, but there is a kind of situation can consider to skip to the next line bank sort, is a line in the two are far apart, my colleagues and I agreed that is more than ten grid will not consider direct access to the next line, bank
skip the line, direct the next line, the thought of our legacy

CodePudding user response:

refer to the 18th floor of the Yangtze river water to write diary response:
Quote: reference Code for reply on 16th floor:
Quote: refer to write diary 12th floor of the Yangtze river water response:
best to clarify some rules, 16 near 6, 6 next is to far, 7, 6 line of this have to clear some

I see what you mean, may I express don't quite understand, sort code to ensure one line grid, but there is a kind of situation can consider to skip to the next line bank sort, is a line in the two are far apart, my colleagues and I agreed that is more than ten grid they don't consider the bank directly to the next line,
skip the line, the next line directly, our legacy thought it

This I used a set the list to maintain, no allocation of all recorded in a set,
  • Related