Skip to content

Conversation

@ido777
Copy link
Owner

@ido777 ido777 commented Apr 6, 2025

Imported from donnemartin/system-design-primer#469

Original author: @john-the-dev


Exchange the item with the last item in the array and then pop it.

donnemartin and others added 26 commits July 2, 2020 21:11
* Additional question, build an exchange

fixes donnemartin#281

* Update README.md

Co-authored-by: Donne Martin <[email protected]>
Exchange the item with the last item in the array and then pop it.
Copilot AI review requested due to automatic review settings April 6, 2025 20:38
@ido777
Copy link
Owner Author

ido777 commented Apr 6, 2025

Imported comment from @tvladyslav

Suggested solution works if order doesn't matter. In sorted array you can't do that.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ido777 ido777 force-pushed the imported-pr-469 branch from ab57931 to 1745c83 Compare May 14, 2025 08:35
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.