Repository: TheAlgorithms/Python

Issue:
sorts/random_normal_distribution_quicksort.py has no tests
### Repository commit

3

### Python version (python --version)

Python 3.11.5

### Dependencies version (pip freeze)

Numpy

### Expected behavior

Tests.

### Actual behavior

No tests.


Discussion:
@prateekiiest
Explain a bit more about this problem. Maybe I can help.
If its regarding coming up with viable test cases and ensure running of the algortihm, I can help out!

Please read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md) to understand what this repo requires for tests.
Hey, Im'ma take this problem up.
As discussed in [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md), we do NOT assign issues.  We review pull requests.
@cclauss I think this file should be deleted entirely. It's just an implementation of quicksort with a random pivot (which we already have), and the only difference is that the _array elements_ themselves follow a normal distribution. For all intents and purposes, it's a duplicate of [sorts/random_pivot_quick_sort.py](https://github.com/TheAlgorithms/Python/blob/dec96438be1a165eaa300a4d6df33e338b4e44c6/sorts/random_pivot_quick_sort.py).
@tianyizheng02 hi, I am a beginner in open source and it is my first time contributing in a big repo like this. So I deleted the file random_normal_distribution_quicksort.py which you said is a copy of the random_pivot_quicksort.py . If I have made any mistakes please feel free to inform me, Thank you.
Reopening this issue because I just realized that `quick_sort.py` already uses a random pivot, which means that _both_ `random_normal_distribution_quicksort.py` and `random_pivot_quick_sort.py` are duplicates and both should be deleted.

Resolving patch:
diff --git a/sorts/random_normal_distribution_quicksort.py b/sorts/random_normal_distribution_quicksort.py
deleted file mode 100644
--- a/sorts/random_normal_distribution_quicksort.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from random import randint
-from tempfile import TemporaryFile
-
-import numpy as np
-
-
-def _in_place_quick_sort(a, start, end):
-    count = 0
-    if start < end:
-        pivot = randint(start, end)
-        temp = a[end]
-        a[end] = a[pivot]
-        a[pivot] = temp
-
-        p, count = _in_place_partition(a, start, end)
-        count += _in_place_quick_sort(a, start, p - 1)
-        count += _in_place_quick_sort(a, p + 1, end)
-    return count
-
-
-def _in_place_partition(a, start, end):
-    count = 0
-    pivot = randint(start, end)
-    temp = a[end]
-    a[end] = a[pivot]
-    a[pivot] = temp
-    new_pivot_index = start - 1
-    for index in range(start, end):
-        count += 1
-        if a[index] < a[end]:  # check if current val is less than pivot value
-            new_pivot_index = new_pivot_index + 1
-            temp = a[new_pivot_index]
-            a[new_pivot_index] = a[index]
-            a[index] = temp
-
-    temp = a[new_pivot_index + 1]
-    a[new_pivot_index + 1] = a[end]
-    a[end] = temp
-    return new_pivot_index + 1, count
-
-
-outfile = TemporaryFile()
-p = 100  # 1000 elements are to be sorted
-
-
-mu, sigma = 0, 1  # mean and standard deviation
-X = np.random.normal(mu, sigma, p)
-np.save(outfile, X)
-print("The array is")
-print(X)
-
-
-outfile.seek(0)  # using the same array
-M = np.load(outfile)
-r = len(M) - 1
-z = _in_place_quick_sort(M, 0, r)
-
-print(
-    "No of Comparisons for 100 elements selected from a standard normal distribution"
-    "is :"
-)
-print(z)


Test patch: