---
id: 6564aee9c077774ea49c3faf
title: Step 3
challengeType: 20
dashedName: step-3
---

# --description--

The merge sort algorithm mainly performs three actions:

- Divide an unsorted sequence of items into sub-parts
- Sort the items in the sub-parts
- Merge the sorted sub-parts

The above happens recursively until the sub-parts are merged into the complete sorted sequence. Let's start by dividing the sequence.

First, replace the `pass` keyword with a variable `middle_point`. Use the integer division operator (`//`) to divide the length of the `array` list by 2 and assign the result to your new `middle_point` variable. Remember to indent your code.

# --hints--

You should not have `pass` in the body of the function.

```js
({
  test: () => {
    const transformedCode = code.replace(/\r/g, "");
    const merge_sort = __helpers.python.getDef("\n" + transformedCode, "merge_sort");
    const { function_body } = merge_sort;

    assert.notMatch(function_body, /^\s{4}pass/m);
  }
})
```

You should declare a `middle_point` variable and assign `len(array) // 2` to it.

```js
({
  test: () => {
    const transformedCode = code.replace(/\r/g, "");
    const merge_sort = __helpers.python.getDef("\n" + transformedCode, "merge_sort");
    const { function_body } = merge_sort;

    assert.match(function_body, /^\s{4}middle_point\s*=\s*len\(\s*array\s*\)\s*\/\/\s*2/m);
  }
})
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--
def merge_sort(array):
    pass
--fcc-editable-region--
```
