Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Postman Sort in JavaScript #2729

Merged
merged 1 commit into from
May 3, 2020
Merged

Added Postman Sort in JavaScript #2729

merged 1 commit into from
May 3, 2020

Conversation

heisenbuggs
Copy link
Contributor

@heisenbuggs heisenbuggs commented Apr 9, 2020

Fixes #2251

Checklist:

  • 4 space indentation.
  • Coding conventions are followed.
  • Input is taken dynamically.
  • Sample Input / Output is added at the end of file.
  • Logic Documentation (Comments).
  • File names are correct.

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

Changes proposed in this pull request:

  • Added Postman Sort Implementation in JavaScript

Languages Used:

  • JavaScript

Files Added:

  • Postman_Sort.js

We're happy to help you get this ready -- don't be afraid to ask for help.

Thanks!

@heisenbuggs
Copy link
Contributor Author

@jainaman224 @asha15 @SakshiShreya I have created a PR for Postman Sort in JavaScript. Kindly have a look at it.

@heisenbuggs
Copy link
Contributor Author

@somya-kapoor I have created a PR for Postman Sort in JavaScript. Kindly have a look at it.

Postman_Sort/Postman_Sort.js Show resolved Hide resolved
Postman_Sort/Postman_Sort.js Outdated Show resolved Hide resolved
Postman_Sort/Postman_Sort.js Outdated Show resolved Hide resolved
t = j;
}
}
temp = arr1[t];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a swap function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in Javascript, Call by reference functions don't work as there are no pointers in js. Therefore i haven't used swap function here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Postman_Sort/Postman_Sort.js Show resolved Hide resolved
Postman_Sort/Postman_Sort.js Outdated Show resolved Hide resolved
Postman_Sort/Postman_Sort.js Outdated Show resolved Hide resolved
@heisenbuggs
Copy link
Contributor Author

@jainaman224 @singh-shreya6 @somya-kapoor I have modified the code. Kindly have a look at it.

Postman_Sort/Postman_Sort.js Outdated Show resolved Hide resolved
@heisenbuggs
Copy link
Contributor Author

@singh-shreya6 I have done the required changes. Please have a look at it.

singh-shreya6
singh-shreya6 previously approved these changes May 3, 2020
@singh-shreya6
Copy link
Collaborator

Please squash your commits now, so that it can be merged

@heisenbuggs
Copy link
Contributor Author

@singh-shreya6 I have squashed the commits. Kindly do have a look at it.

@singh-shreya6 singh-shreya6 merged commit 9dc9e66 into jainaman224:master May 3, 2020
Amitsharma45 pushed a commit to Amitsharma45/Algo_Ds_Notes that referenced this pull request May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postman sort
2 participants