From 92507d515bffff2dc26792f876b79ba663b01c13 Mon Sep 17 00:00:00 2001 From: Mohammed Aman Nawaz <84686645+beastaman@users.noreply.github.com> Date: Mon, 16 Oct 2023 01:51:45 +0530 Subject: [PATCH 1/4] Create quicksort.py --- scripts/quicksort.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/quicksort.py diff --git a/scripts/quicksort.py b/scripts/quicksort.py new file mode 100644 index 000000000..ad9a9fa31 --- /dev/null +++ b/scripts/quicksort.py @@ -0,0 +1,15 @@ +def quicksort(arr): + if len(arr) <= 1: + return arr + + pivot = arr[len(arr) // 2] + left = [x for x in arr if x < pivot] + middle = [x for x in arr if x == pivot] + right = [x for x in arr if x > pivot] + + return quicksort(left) + middle + quicksort(right) + +# Example usage: +my_list = [3, 6, 8, 10, 1, 2, 1] +sorted_list = quicksort(my_list) +print("Sorted array:", sorted_list) From 4b0bda0f433eaf47317706192c28e8e992baaca4 Mon Sep 17 00:00:00 2001 From: Mohammed Aman Nawaz <84686645+beastaman@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:46:00 +0530 Subject: [PATCH 2/4] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7b0c41a5..fa89b4069 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,9 @@ +#### Name: [Mohammed Aman](https://giithub.com/beastaman) + +- Place: Hyderabad, Telangana, India +- Bio: Frontend Developer | ReactJs Developer | Tech Enthusiast +- GitHub: [beastaman](https://github.com/beastaman) + #### Name: [3mYouOL](https://github.com/3mYouOL) - Place: Iloilo, Philippines From 07bec6e5c8ae8793d379bf225b7a7900351d4cbe Mon Sep 17 00:00:00 2001 From: Mohammed Aman Nawaz <84686645+beastaman@users.noreply.github.com> Date: Mon, 16 Oct 2023 15:54:42 +0530 Subject: [PATCH 3/4] Create mohd_aman.md --- profiles/mohd_aman.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 profiles/mohd_aman.md diff --git a/profiles/mohd_aman.md b/profiles/mohd_aman.md new file mode 100644 index 000000000..60fb8a1d6 --- /dev/null +++ b/profiles/mohd_aman.md @@ -0,0 +1,40 @@ +
+ +[![Typing SVG](https://readme-typing-svg.herokuapp.com?font=Fira+Code&pause=1000&color=4700F7&background=00FFD200¢er=true&vCenter=true&width=435&lines=Hi%2C+Beast+Aman+Here...)](https://git.io/typing-svg) +# I'm a Front End Web Developer + +
+ +
+ +###   Introduction: + +- šŸŒ± Iā€™m currently working as Frontend Developer +- šŸ¤” Iā€™m looking for help with other content creators +- šŸ“« How to reach me: āœØ _[my web][website]_ āœØ +- āš” Fun fact: I love to play guitar and cook + +### šŸ§ā€ā™‚ļø   Connect with me: + +[![Facebook](https://img.shields.io/badge/Facebook-%231877F2.svg?style=for-the-badge&logo=Facebook&logoColor=white)][facebook] +[![Instagram](https://img.shields.io/badge/Instagram-%23E4405F.svg?style=for-the-badge&logo=Instagram&logoColor=white)][instagram] +[![dev](https://img.shields.io/badge/Dev-%23000000.svg?style=for-the-badge&logo=Dev&logoColor=white)][dev] +[![medium](https://img.shields.io/badge/Medium-%23000000.svg?style=for-the-badge&logo=Medium&logoColor=white)][medium] +[![CodePen](https://img.shields.io/badge/Codepen-000000?style=for-the-badge&logo=codepen&logoColor=white)][codepen] + +### šŸ–„   Skills & Tools: + +![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white) +![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white) +![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E) +![PHP](https://img.shields.io/badge/php-%23777BB4.svg?style=for-the-badge&logo=php&logoColor=white) +![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB) +![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) + + +[website]: https://beastaman.github.io/myweb +[instagram]: https://www.instagram.com/mohd_aman_25/ +[facebook]: https://www.facebook.com/mohammedaman.nawaz.77 +[medium]: https://www.medium.com/mohammedamannawaz +[codepen]: https://codepen.io/itsaman25 +[dev]: https://dev.to/beastaman25 From 2a44517545d41422424771e2d72f6c5b19e252b9 Mon Sep 17 00:00:00 2001 From: Mohammed Aman Nawaz <84686645+beastaman@users.noreply.github.com> Date: Mon, 16 Oct 2023 16:09:01 +0530 Subject: [PATCH 4/4] Create mergesort.py --- scripts/mergesort.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 scripts/mergesort.py diff --git a/scripts/mergesort.py b/scripts/mergesort.py new file mode 100644 index 000000000..dcc77d82f --- /dev/null +++ b/scripts/mergesort.py @@ -0,0 +1,39 @@ +def merge_sort(arr): + if len(arr) > 1: + mid = len(arr) // 2 # Find the middle of the array + left_half = arr[:mid] # Divide the array into two halves + right_half = arr[mid:] + + # Recursive call on each half + merge_sort(left_half) + merge_sort(right_half) + + i = j = k = 0 + + # Copy data to temporary arrays left_half and right_half + while i < len(left_half) and j < len(right_half): + if left_half[i] < right_half[j]: + arr[k] = left_half[i] + i += 1 + else: + arr[k] = right_half[j] + j += 1 + k += 1 + + # Check if any element was left + while i < len(left_half): + arr[k] = left_half[i] + i += 1 + k += 1 + + while j < len(right_half): + arr[k] = right_half[j] + j += 1 + k += 1 + +# Example usage: +if __name__ == "__main__": + arr = [12, 11, 13, 5, 6, 7] + print("Unsorted array:", arr) + merge_sort(arr) + print("Sorted array:", arr)