> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/s/sort_disjoint_sublist.md).

# Sort disjoint sublist

```ruby
func disjointSort(values, indices) {
    values[indices.sort] = [values[indices]].sort...
}

var values =  [7, 6, 5, 4, 3, 2, 1, 0]
var indices = [6, 1, 7]

disjointSort(values, indices)
say values
```

#### Output:

```
[7, 0, 5, 4, 3, 2, 1, 6]
```
