| 44 | |
| 45 | |
| 46 | class NWayMerge(object): |
| 47 | def select(self, choices): |
| 48 | min_index = -1 |
| 49 | min_str = None |
| 50 | |
| 51 | for i in range(len(choices)): |
| 52 | if min_str is None or choices[i] < min_str: |
| 53 | min_index = i |
| 54 | |
| 55 | return min_index |
| 56 | |
| 57 | |
| 58 | class FilesArray(object): |