How to sort DocList using FlowService

Hi All,
I have a DocList like
DocList
-Doc
–Name
–Age

I want to sort this DocList using FlowService by order of Age
I dont want to use java service

Thanks a lot

Hello,
You should create a merge sort or a quick sort (recommend). For quicksort, you pick the value at either the middle of the list or the middle minus one and call it pivot. Then make two lists that are either smaller than or equal to pivot or greater than pivot. You then recursively sort the smaller lists. When You detect that the list you have is one element or less, return that list. When you merge the lists upward, it should of course be [lower , higher]. You should try to actually do the sorting in place on the main list. You can do this by tracking the lower and upper index for a partition and bounds checking in the routine to only sub sort that partition space. Without this you will still sort but will have 2^(n-1) +1 : [where n is number of elements in start list] lists created. Good day.

Yemi Bedu

Hello,
I was wrong with the list growth. It is only 2n - 1 which is O(n) expensive. Not an issue is that regard. And the size will about 2n (twice the memory). So that should help to make a better judgement and implementation choice. Good day.

Yemi Bedu

can u tell me the flow steps to be added…