From 4f262b106a70a861bb172563faefbb5837249818 Mon Sep 17 00:00:00 2001 From: Shivay Lamba Date: Thu, 25 Aug 2022 12:41:49 +0530 Subject: [PATCH 1/7] Initial commit, squashed all the commits Update details Update README.md Make final update to ReadME Create CONTRIBUTING.md Add Challenge 1 Update challenge_1.md Update challenge_1.md Create challenge_2.md Create challenge_3.md challenge 4 Challenge 5 Update challenge_5.md Update challenge_5.md Create Kinshuk2003.md Create challenge_6.md Update challenge_6.md Kinshuk2003.md Challenge 6 deleted a line and added two lines added Url of issue created in first challenge Create challenge_7.md --- CONTRIBUTING.md | 15 +++++++ Challenges/challenge_1.md | 12 ++++++ Challenges/challenge_2.md | 11 +++++ Challenges/challenge_3.md | 10 +++++ Challenges/challenge_4.md | 11 +++++ Challenges/challenge_5.md | 28 ++++++++++++ Challenges/challenge_6.md | 19 +++++++++ Challenges/challenge_7.md | 9 ++++ README.md | 57 +++++++++++++++++++++++++ contributors/Kinshuk2003/Kinshuk2003.md | 6 +++ contributors/shivaylamba/shivaylamba.md | 4 ++ 11 files changed, 182 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 Challenges/challenge_1.md create mode 100644 Challenges/challenge_2.md create mode 100644 Challenges/challenge_3.md create mode 100644 Challenges/challenge_4.md create mode 100644 Challenges/challenge_5.md create mode 100644 Challenges/challenge_6.md create mode 100644 Challenges/challenge_7.md create mode 100644 README.md create mode 100644 contributors/Kinshuk2003/Kinshuk2003.md create mode 100644 contributors/shivaylamba/shivaylamba.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..5ed6b25df --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,15 @@ +## Contributing Guidelines + +Thank you for considering contributing to the repository. This guide details all the general information that one should know before contributing to the project. +Please stick as close as possible to the guidelines. That way we ensure that you have a smooth experience contributing to this project. + +### General Rules : +These are in general rules that you should be following while contributing to an Open Source project : + +- Be Nice, Be Respectful (BNBR) +- Check if the Issue you created, exists or not. +- While creating a new issue make sure you describe the issue clearly. +- Make proper commit messages and document your PR well. +- Always add Comments in your Code and explain it at points, if possible add Doctest. +- Always create a Pull Request from a Branch; Never from the Main. +- Follow proper code conventions because writing clean code is important. diff --git a/Challenges/challenge_1.md b/Challenges/challenge_1.md new file mode 100644 index 000000000..ca104e9bf --- /dev/null +++ b/Challenges/challenge_1.md @@ -0,0 +1,12 @@ +## Welcome to Challenge 1 + +Welcome to the first challenge! +We will start off with an easy task. + +Task: +Create a [new issue](https://github.com/scaleracademy/scaler-september-open-source-challenge/issues/new) on this repository with the following details to be added to the content of the issue: + +``` +name: Add your name here +github_user_name: add your github username here +``` diff --git a/Challenges/challenge_2.md b/Challenges/challenge_2.md new file mode 100644 index 000000000..ebf050b64 --- /dev/null +++ b/Challenges/challenge_2.md @@ -0,0 +1,11 @@ +## Welcome to Challenge 2 + +Welcome to the second challenge! +Today we will focus on how to fork and create a clone of a Github repository + +Task: +1. Create a fork of this repository +2. Clone the forked project locally in your system using the ``git clone`` command +3. Add a new comment to the issue you created in the [first task](https://github.com/scaleracademy/scaler-september-open-source-challenge/blob/main/Challenges/challenge_1.md). The comment should have the following: +- URL of your forked repository +- A screenshot of the cloned project in your system diff --git a/Challenges/challenge_3.md b/Challenges/challenge_3.md new file mode 100644 index 000000000..835579e1c --- /dev/null +++ b/Challenges/challenge_3.md @@ -0,0 +1,10 @@ +## Welcome to Challenge 3 + +Welcome to the third challenge! +Today we will focus on how to create a new branch in a git repository + +Task: +1. Following up on the [previous task](https://github.com/scaleracademy/scaler-september-open-source-challenge/blob/main/Challenges/challenge_2.md), create a new branch locally in your forked clone repository +2. The branch name should be as follows: ``your_github_username-details``. Example: ``shivaylamba-details`` +3. Add a new comment to the issue you created in the [first task](https://github.com/scaleracademy/scaler-september-open-source-challenge/blob/main/Challenges/challenge_1.md). The comment should have the following: +- Screenshot showing the list of all the current branches inside of your forked clone repository diff --git a/Challenges/challenge_4.md b/Challenges/challenge_4.md new file mode 100644 index 000000000..42336996c --- /dev/null +++ b/Challenges/challenge_4.md @@ -0,0 +1,11 @@ +## Welcome to Challenge 4 + +Welcome to the fourth challenge! +Today we cover how to Update Fork Repo From the Original Repo + +The main repository has been updated since the last fork that all of you created. The goal is to updated the forked repository with the changes made in the original repository. This can be done with the git command of ``git remote add upstream`` + +Task +1. Update your forked repository locally with the content of the original repository for both the main branch and the branch that you created in Challenge 3 using the ``git remote add upstream`` command +2. Once the changes in the forked repository and the original repository are synced in the git branch that you created in the 3rd Challenge, Add a new comment to the issue you created in the [first task](https://github.com/scaleracademy/scaler-september-open-source-challenge/blob/main/Challenges/challenge_1.md). The comment should have the following: +- Screenshot showing the latest repository contents \ No newline at end of file diff --git a/Challenges/challenge_5.md b/Challenges/challenge_5.md new file mode 100644 index 000000000..3053335a2 --- /dev/null +++ b/Challenges/challenge_5.md @@ -0,0 +1,28 @@ +## Welcome to Challenge 5 + +Welcome to the fifth challenge! +Today's goal is to update your forked repository and then create a Pull Request + +Task +1. Ensure your forked repository is in sync with the latest changes in the main repository. Also ensure that the git branch that you created in Challenge 2 is also in sync with the latest changes +2. Create a new folder inside the `contributors` folder, and name it with your github username. It should look something like this `contributors//`. Ex. + +``` +contributors/shivaylamba/ +``` + +3. Create a markdown file in the folder you created following the naming convention for the file: `.md`. Ex. + +``` +contributors/shivaylamba/shivaylamba.md +``` + +4. Copy the following template into your file, delete the placeholder text and fill the information with yours. + +``` +--- +name: your_name +github_user_name: YOUR-GITHUB-USERNAME +--- +``` +5. Submit your Pull Request on the main challenge repo. diff --git a/Challenges/challenge_6.md b/Challenges/challenge_6.md new file mode 100644 index 000000000..701d59f78 --- /dev/null +++ b/Challenges/challenge_6.md @@ -0,0 +1,19 @@ +## Welcome to Challenge 6 + +Welcome to the sixth challenge! +Today's goal is to update your pull request that you created in [Challenge 5](https://github.com/scaleracademy/scaler-september-open-source-challenge/blob/main/Challenges/challenge_5.md?plain=1) + +Task +1. Create a new commit in the branch you created in Challenge 2 in your forked repository +2. The change that you have to make should be the following: +In the markdown file that was created in Challenge 5, edit the details as follows: +``` +--- +name: your_name +github_user_name: YOUR-GITHUB-USERNAME +url_of_github_issue: Link_of_the_github_issue_created_in_first_challenge +--- +``` +3. After making this change create a commit with a proper commit message and push the changes +4. Check if the commit reflects in the Pull request you created in Challenge 5 + diff --git a/Challenges/challenge_7.md b/Challenges/challenge_7.md new file mode 100644 index 000000000..fe5cfb0bf --- /dev/null +++ b/Challenges/challenge_7.md @@ -0,0 +1,9 @@ +## Welcome to Challenge 7 + +Welcome to the seventh challenge! +Today's goal is to implement the squashing of the git commits. Squashing is used to combine multiple commits into one. This is done using the interactive mode of Git Rebase command. +In the [6th Challenge](https://github.com/scaleracademy/scaler-september-open-source-challenge/blob/main/Challenges/challenge_6.md?plain=1) all of you created an additional commit to update the markdown file. +So refer to [this guide](https://www.freecodecamp.org/news/git-squash-explained/) on Git merge. + +Task: +1. Using the interactive mode of Git Rebase command combine the multiple commits created in your Pull requests and then push that to the Pull request you have created in the previous challenges. diff --git a/README.md b/README.md new file mode 100644 index 000000000..6c03e71e7 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# Scaler September Open Source Challenge + + +

+ +

+
+ +## What is the Scaler September Open Source Challenge? +Link for [Notion page](https://scalerdiscord.notion.site/scalerdiscord/Open-Source-September-Scaler-Discord-Community-f9306c7dc15a464ba1b6ea7ee30cdf0d). + +Every day throughout September, for those who have enrolled, we will share one task.  +Participants will need to use their knowledge of Git and Github for each task, and the difficulty level of the tasks will rise daily. + +The primary objective? To help the community become better at contributing to open source and building projects. + +## Learning Outcomes +1. Learn how to contribute to open source projects. Learn the basics of creating issues, pull requests, Git and Github +2. Celebrate with new rewards every time you reach a milestone! + +## How to participate? + +### Step 1 + +Accept the challenge by filling out this form: [https://bit.ly/opensourcesepbyscaler](https://bit.ly/opensourcesepbyscaler) + +### Step 2 + +If you haven't already, create an account on Github, and brush up on your skills in Git and Github. + +### Step 3 + +Head to the official [Scaler Open Source challenge repository](https://github.com/scaleracademy/scaler-september-open-source-challenge/). Star it. + +Keep track of the README, as a new task will be added every day. + +Please go through the task for that day and solve it. + +### Step 4 + +Don't forget to share your progress within the community if you want those rewards! + +## Prizes +Consistency is what we're after. As a result, we have several levels or awards based on how consistently you complete the assignments. +You won't be qualified for the remaining tasks of the challenge if you are unable to complete and submit a task on any given day. + +Here is the reward [tier list](https://scalerdiscord.notion.site/3eabe9a1900c4b8685ae55acb5c33cbe?v=001e8d4c287f4d96bae935c5d45de521). + +## Contact Us +For all communications and queries, you can join our [Discord Server](https://discord.com/invite/scaler). + +## Resources +1. Launch Video for the September Challenge: [Guide to Github and the Open Source Challenge](https://youtu.be/70nx_YxE56Q) +2. Git Tutorial: [Full Git Tutorial](https://www.youtube.com/watch?v=ZtfZGVQWjew) +3. Find good first issues to contribute to: [Good First issues](https://goodfirstissue.dev/) +4. Getting started with Github: [All you need to know about Github](https://www.youtube.com/watch?v=8WYXWs96xxc) +5. How to contribute to Open Source: [Open Source contribution guide](https://www.youtube.com/watch?v=ABty2r3nDyU) diff --git a/contributors/Kinshuk2003/Kinshuk2003.md b/contributors/Kinshuk2003/Kinshuk2003.md new file mode 100644 index 000000000..3a385adc9 --- /dev/null +++ b/contributors/Kinshuk2003/Kinshuk2003.md @@ -0,0 +1,6 @@ +--- +name: Kinshuk Goyal + +github_user: Kinshuk2003 +url_of_github_issue: https://github.com/scaleracademy/scaler-september-open-source-challenge/issues/205 +--- diff --git a/contributors/shivaylamba/shivaylamba.md b/contributors/shivaylamba/shivaylamba.md new file mode 100644 index 000000000..6e3107508 --- /dev/null +++ b/contributors/shivaylamba/shivaylamba.md @@ -0,0 +1,4 @@ +--- +name: Shivay Lamba +github_user: shivaylamba +--- \ No newline at end of file From 7d12751ab2e544ac870447775161e47f35413225 Mon Sep 17 00:00:00 2001 From: Kinshuk2003 Date: Fri, 9 Sep 2022 18:10:36 +0530 Subject: [PATCH 2/7] Revert "Initial commit, squashed all the commits" This reverts commit b85b6febd44a4aba8dd516da8e1f51803054e71f. Initial commit Update details Update README.md Make final update to ReadME Create CONTRIBUTING.md Add Challenge 1 Update challenge_1.md Update challenge_1.md Create challenge_2.md Create challenge_3.md challenge 4 Challenge 5 Update challenge_5.md Update challenge_5.md Create challenge_6.md Update challenge_6.md Create challenge_7.md Create challenge_8.md Update challenge_8.md Create challenge_9.md Create challenge_10.md a new commit Signed-off-by: Kinshuk2003 --- Challenges/challenge_10.md | 22 +++++++++++++++++++ Challenges/challenge_8.md | 11 ++++++++++ Challenges/challenge_9.md | 19 ++++++++++++++++ contributors/Kinshuk2003-2.md | 1 + .../{Kinshuk2003.md => Kinshuk2003.md.txt} | 6 ++--- 5 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 Challenges/challenge_10.md create mode 100644 Challenges/challenge_8.md create mode 100644 Challenges/challenge_9.md create mode 100644 contributors/Kinshuk2003-2.md rename contributors/Kinshuk2003/{Kinshuk2003.md => Kinshuk2003.md.txt} (54%) diff --git a/Challenges/challenge_10.md b/Challenges/challenge_10.md new file mode 100644 index 000000000..bbe1a7709 --- /dev/null +++ b/Challenges/challenge_10.md @@ -0,0 +1,22 @@ +## Welcome to Challenge 10 + +Welcome to the 10th challenge! + +Today's challenge is based on the concept of signing your commits. Signing the commits is a way of showing that only authentic commits are being made. + +A lot of open source projects have DCO which stands for [Developer Certification of Origin](https://github.com/apps/dco) including this repository itself and it tries to verify that each commit is signed or not. In case your commit is not signed it will reflect in the pull request that it doesn't pass the DCO test. + +You can read more about how to sign commits [here](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) + +Task: +1. Setup the ability to sign commits locally in your systems +2. Whenever committing in the future always try to use signed commits +3. Make a new signed commit to the pull request that you have made in previous challenges by making this change to the ``yourusername.md`` file: +``` +--- +name: your_name +github_user_name: YOUR-GITHUB-USERNAME +url_of_github_issue: Link_of_the_github_issue_created_in_first_challenge +your_favroite_programming_language: Add your favorite programming language here +--- +``` diff --git a/Challenges/challenge_8.md b/Challenges/challenge_8.md new file mode 100644 index 000000000..a143bd663 --- /dev/null +++ b/Challenges/challenge_8.md @@ -0,0 +1,11 @@ +## Welcome to Challenge 8 + +Welcome to the 8th challenge! + +Today's challenge is simple. But along side the task, please give the [following article](https://www.atlassian.com/git/tutorials/undoing-changes/git-reset) a read, as this will be used in Challenge 9. + + +Task: +1. Inside the branch you created during the prior challenges in your forked repository, make a new file by the name of ``your-github-username-2.md`` and add any details you may want to add to this markwdown file and push the change + +2. Ensure the change appears in the Pull request created in previous challenges diff --git a/Challenges/challenge_9.md b/Challenges/challenge_9.md new file mode 100644 index 000000000..895473b94 --- /dev/null +++ b/Challenges/challenge_9.md @@ -0,0 +1,19 @@ +## Welcome to Challenge 9 + +Welcome to the ninth challenge! + +Today's task is a continuation of yesterday's task [Task 8](https://github.com/scaleracademy/scaler-september-open-source-challenge/blob/main/Challenges/challenge_8.md?plain=1). + +Yesterday the task was to create an additional commit in your branch. And today's focus will be to remove that commit that has been pushed from the pull request created in previous challenges. The main purpose of this is because there can be times when you might push an unncessary or wrong commit and you way want to remove it from your pull request. + +This can be done by using the following command: ``git reset`` + +Here is an article you can refer to for understanding how git reset works: https://www.atlassian.com/git/tutorials/undoing-changes/git-reset#:~:text=a%20shared%20repository.-,Summary,Index%2C%20and%20the%20Working%20Directory. + +So the task is to identity the commit id of the commit you want to remove, use the git reset command, and remove the commit from the pull request by force pushing into it. + + +Task: +1. Identify the commit id that needs to be removed (you should have created this in the 8th Challenge) +2. Use git reset and force push, to remove the commit from your pull request. +3. Share a screenshot of this, in the issue you created in previous challenges. diff --git a/contributors/Kinshuk2003-2.md b/contributors/Kinshuk2003-2.md new file mode 100644 index 000000000..4f5c1f0a4 --- /dev/null +++ b/contributors/Kinshuk2003-2.md @@ -0,0 +1 @@ +hi i am kinshuk goyal a competitive programmer diff --git a/contributors/Kinshuk2003/Kinshuk2003.md b/contributors/Kinshuk2003/Kinshuk2003.md.txt similarity index 54% rename from contributors/Kinshuk2003/Kinshuk2003.md rename to contributors/Kinshuk2003/Kinshuk2003.md.txt index 3a385adc9..1d51773c5 100644 --- a/contributors/Kinshuk2003/Kinshuk2003.md +++ b/contributors/Kinshuk2003/Kinshuk2003.md.txt @@ -1,6 +1,6 @@ --- name: Kinshuk Goyal - -github_user: Kinshuk2003 +github_user_name: Kinshuk2003 url_of_github_issue: https://github.com/scaleracademy/scaler-september-open-source-challenge/issues/205 ---- +your_favroite_programming_language: C, C++, Python, HTML, CSS, JAVASCRIPT +--- \ No newline at end of file From e76a252e175038cdb5b54f7d48e4963533e98676 Mon Sep 17 00:00:00 2001 From: Kinshuk2003 Date: Fri, 16 Sep 2022 22:16:27 +0530 Subject: [PATCH 3/7] Challenger 16: Resolved merge conflict Signed-off-by: Kinshuk2003 --- challengers-list.md | 1 + 1 file changed, 1 insertion(+) diff --git a/challengers-list.md b/challengers-list.md index 2fb6f60ea..5ead94829 100644 --- a/challengers-list.md +++ b/challengers-list.md @@ -2,3 +2,4 @@ 1. [Mrinal](https://github.com/mrinal1224) 2. [Shivay](https://github.com/shivaylamba) 3. [Raghav](https://github.com/raghavdhingra) +4. [Kinshuk](https://github.com/Kinshuk2003) From 2ef9c68f9e96ed91a52895737716e5c9dfa17487 Mon Sep 17 00:00:00 2001 From: Kinshuk2003 Date: Sun, 18 Sep 2022 17:57:54 +0530 Subject: [PATCH 4/7] adding the gist-solutions.md file Signed-off-by: Kinshuk2003 --- contributors/Kinshuk2003/gist-solutions.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 contributors/Kinshuk2003/gist-solutions.md diff --git a/contributors/Kinshuk2003/gist-solutions.md b/contributors/Kinshuk2003/gist-solutions.md new file mode 100644 index 000000000..d73280058 --- /dev/null +++ b/contributors/Kinshuk2003/gist-solutions.md @@ -0,0 +1,4 @@ +#links to gist + +1. [software development topic](https://gist.github.com/Kinshuk2003/4cea2ff56db2b4da9f26e36f6b11bfee) +2. [Code snippet](https://gist.github.com/Kinshuk2003/ee923b2feaf424367d34e9eae452ec86) \ No newline at end of file From 0c5e2820d6759677cde0f4c9b17dc4956fa1af02 Mon Sep 17 00:00:00 2001 From: Kinshuk2003 Date: Mon, 19 Sep 2022 19:51:55 +0530 Subject: [PATCH 5/7] adding the insertionsort.py Signed-off-by: Kinshuk2003 --- contributors/Kinshuk2003-2.md | 1 - .../{Kinshuk2003.md.txt => Kinshuk2003.md} | 0 contributors/Kinshuk2003/gist-solutions.md | 4 ++-- contributors/Kinshuk2003/insertionsort.py | 22 +++++++++++++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) delete mode 100644 contributors/Kinshuk2003-2.md rename contributors/Kinshuk2003/{Kinshuk2003.md.txt => Kinshuk2003.md} (100%) create mode 100644 contributors/Kinshuk2003/insertionsort.py diff --git a/contributors/Kinshuk2003-2.md b/contributors/Kinshuk2003-2.md deleted file mode 100644 index 4f5c1f0a4..000000000 --- a/contributors/Kinshuk2003-2.md +++ /dev/null @@ -1 +0,0 @@ -hi i am kinshuk goyal a competitive programmer diff --git a/contributors/Kinshuk2003/Kinshuk2003.md.txt b/contributors/Kinshuk2003/Kinshuk2003.md similarity index 100% rename from contributors/Kinshuk2003/Kinshuk2003.md.txt rename to contributors/Kinshuk2003/Kinshuk2003.md diff --git a/contributors/Kinshuk2003/gist-solutions.md b/contributors/Kinshuk2003/gist-solutions.md index d73280058..ad042605e 100644 --- a/contributors/Kinshuk2003/gist-solutions.md +++ b/contributors/Kinshuk2003/gist-solutions.md @@ -1,4 +1,4 @@ -#links to gist +# links to gist 1. [software development topic](https://gist.github.com/Kinshuk2003/4cea2ff56db2b4da9f26e36f6b11bfee) -2. [Code snippet](https://gist.github.com/Kinshuk2003/ee923b2feaf424367d34e9eae452ec86) \ No newline at end of file +2. [Code snippet](https://gist.github.com/Kinshuk2003/ee923b2feaf424367d34e9eae452ec86) diff --git a/contributors/Kinshuk2003/insertionsort.py b/contributors/Kinshuk2003/insertionsort.py new file mode 100644 index 000000000..5d2ca2b22 --- /dev/null +++ b/contributors/Kinshuk2003/insertionsort.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + + +def InsertionSort(arr): + + n = len(arr) + + for i in range(0, n): + key = arr[i] + j = i - 1 + while j >= 0 and key < arr[j]: + arr[j + 1] = arr[j] + j -= 1 + arr[j + 1] = key + + +# driver code + +arr = [6, 5, 3, 2, 8, 10, 9] +InsertionSort(arr) +print(arr) From e947bfa6d3ba18c6324c2a099cef48afb953344f Mon Sep 17 00:00:00 2001 From: Kinshuk2003 Date: Mon, 19 Sep 2022 19:51:55 +0530 Subject: [PATCH 6/7] adding the insertionsort.py Signed-off-by: Kinshuk2003 --- contributors/Kinshuk2003-2.md | 1 - .../{Kinshuk2003.md.txt => Kinshuk2003.md} | 0 contributors/Kinshuk2003/gist-solutions.md | 4 ++-- contributors/Kinshuk2003/insertionsort.py | 22 +++++++++++++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) delete mode 100644 contributors/Kinshuk2003-2.md rename contributors/Kinshuk2003/{Kinshuk2003.md.txt => Kinshuk2003.md} (100%) create mode 100644 contributors/Kinshuk2003/insertionsort.py diff --git a/contributors/Kinshuk2003-2.md b/contributors/Kinshuk2003-2.md deleted file mode 100644 index 4f5c1f0a4..000000000 --- a/contributors/Kinshuk2003-2.md +++ /dev/null @@ -1 +0,0 @@ -hi i am kinshuk goyal a competitive programmer diff --git a/contributors/Kinshuk2003/Kinshuk2003.md.txt b/contributors/Kinshuk2003/Kinshuk2003.md similarity index 100% rename from contributors/Kinshuk2003/Kinshuk2003.md.txt rename to contributors/Kinshuk2003/Kinshuk2003.md diff --git a/contributors/Kinshuk2003/gist-solutions.md b/contributors/Kinshuk2003/gist-solutions.md index d73280058..ad042605e 100644 --- a/contributors/Kinshuk2003/gist-solutions.md +++ b/contributors/Kinshuk2003/gist-solutions.md @@ -1,4 +1,4 @@ -#links to gist +# links to gist 1. [software development topic](https://gist.github.com/Kinshuk2003/4cea2ff56db2b4da9f26e36f6b11bfee) -2. [Code snippet](https://gist.github.com/Kinshuk2003/ee923b2feaf424367d34e9eae452ec86) \ No newline at end of file +2. [Code snippet](https://gist.github.com/Kinshuk2003/ee923b2feaf424367d34e9eae452ec86) diff --git a/contributors/Kinshuk2003/insertionsort.py b/contributors/Kinshuk2003/insertionsort.py new file mode 100644 index 000000000..5d2ca2b22 --- /dev/null +++ b/contributors/Kinshuk2003/insertionsort.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + + +def InsertionSort(arr): + + n = len(arr) + + for i in range(0, n): + key = arr[i] + j = i - 1 + while j >= 0 and key < arr[j]: + arr[j + 1] = arr[j] + j -= 1 + arr[j + 1] = key + + +# driver code + +arr = [6, 5, 3, 2, 8, 10, 9] +InsertionSort(arr) +print(arr) From b7883062dcd3e932855a74c15b6b8adfb0deef93 Mon Sep 17 00:00:00 2001 From: Kinshuk2003 Date: Thu, 22 Sep 2022 23:37:11 +0530 Subject: [PATCH 7/7] update git hub pages link Signed-off-by: Kinshuk2003 --- contributors/Kinshuk2003/Kinshuk2003.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contributors/Kinshuk2003/Kinshuk2003.md b/contributors/Kinshuk2003/Kinshuk2003.md index 1d51773c5..086268f3b 100644 --- a/contributors/Kinshuk2003/Kinshuk2003.md +++ b/contributors/Kinshuk2003/Kinshuk2003.md @@ -3,4 +3,6 @@ name: Kinshuk Goyal github_user_name: Kinshuk2003 url_of_github_issue: https://github.com/scaleracademy/scaler-september-open-source-challenge/issues/205 your_favroite_programming_language: C, C++, Python, HTML, CSS, JAVASCRIPT +your_hosted_github_pages_link: https://kinshuk2003.github.io/ +your_hosted_github_pages_repository_link: https://github.com/Kinshuk2003/Kinshuk2003.github.io --- \ No newline at end of file