I need an algorithm that updates position of one or more fields.
Inputs:-
-
An item id.
-
Items updated position.
Output:-
Must return true if all done else false.
Processing:-
I have a list of items.
When i re-order the position of any item the positions of all those items must update if require else only that particular item position updates.
Note:-
-
Any position should not repeat.
-
Maximum position must be equal to total number of items.