2 Dimensional Array Sorting

Vino.B via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 27 04:53:29 PDT 2017


On Saturday, 26 August 2017 at 10:53:03 UTC, Vino.B wrote:
> On Saturday, 26 August 2017 at 10:45:13 UTC, Vino.B wrote:
>> On Saturday, 26 August 2017 at 10:07:53 UTC, user1234 wrote:
>>> [...]
>>
>> Hi,
>>
>>  Now there is no duplicate , but the sequence is still not 
>> correct
>>
>> [...]
>
> Hi,
>
>   If I execute the script several time's i still get the 
> duplicate entries.
>
> From,
> Vino.B

Hi,

   After analyzing a bit further was able to find that the  out 
data before sorting is like below(4 - 2 dimensional array) hence 
the sorting is not working, so may i know how do i make this as a 
single 2 dimensional array like below

Required:
[["C:\\Temp\\TEAM2\\TEAM\\DIR1", "40"], 
["C:\\Temp\\TEAM2\\TEAM\\DIR2", "2228"], 
["C:\\Temp\\TEAM3\\EXPORT\\dir2", "61"], 
["C:\\Temp\\TEAM2\\PROD_TEAM\\dir1", "35772"], 
["C:\\Temp\\TEAM2\\BACKUP\\dir1", "35732"], 
["C:\\Temp\\TEAM3\\BACKUP\\dir1", "71465"], 
["C:\\Temp\\TEAM2\\EXPORT\\dir2", "30"]]

Output:
[["C:\\Temp\\TEAM2\\TEAM\\DIR1", "40"], 
["C:\\Temp\\TEAM2\\TEAM\\DIR2", "2228"], 
["C:\\Temp\\TEAM3\\EXPORT\\dir2", "61"]] - 2darray 1

[["C:\\Temp\\TEAM2\\PROD_TEAM\\dir1", "35772"]] - 2darray 2

[["C:\\Temp\\TEAM2\\BACKUP\\dir1", "35732"], 
["C:\\Temp\\TEAM3\\BACKUP\\dir1", "71465"]]  - 2darray 3

[["C:\\Temp\\TEAM2\\EXPORT\\dir2", "30"]]  - 2darray 4

From,
Vino.B



More information about the Digitalmars-d-learn mailing list