Skip to content

Comments

Added p’th Smallest/Largest Element in Unsorted Array in cpp#265

Open
msbuddhu wants to merge 1 commit intoankitapuri:mainfrom
msbuddhu:msbuddhu
Open

Added p’th Smallest/Largest Element in Unsorted Array in cpp#265
msbuddhu wants to merge 1 commit intoankitapuri:mainfrom
msbuddhu:msbuddhu

Conversation

@msbuddhu
Copy link

@msbuddhu msbuddhu commented Mar 8, 2021

Related Issues

  • Added p'th Smallest/Largest Element in Unsorted Array in cpp

Closes: #[issue number that will be closed through this PR]

Describe the changes you've made

Given an array and a number p where p is smaller than size of array, we need to find the p’th smallest element in the given array.
It is given that all array elements are distinct. I have added the solution in c++.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Yes.

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

NA

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Screenshots

Original Updated
original screenshot updated screenshot

@msbuddhu
Copy link
Author

I have contributed to issue #265. Please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant