|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hi,
i'd like to ask you for some help with my problem. I need to find non-standard sorting order within some words. What do I mean non-standard order ? Standard sorting order is A..Z or Z..A. Non-standard is for example C,H,K,L,..Z. The solution of the problem should lie under theory of graphs. For example some input/output: Input: deer,deerp,ee,ers,rrp,sz So in the case of input above the output (found non-standard order) will be DERPSZ. Input is sorted with "unknown" non-standard sorting order. My rough solution is something like that: First enumerate all unique char in each word and next look for ancestor/descendant inside graph. deer : DER deerp : DERP ee : E ers : ERS rrp : RP sz : SZ Any idea ? Or just tip for algorithm ? Thanks in advance |
| Sponsored Links |
|
|
|
|||||
|
How about a Trie? Trie - Wikipedia, the free encyclopedia
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 98%