Skip to content

Solution #31 - Neha Amin - 17/07/25 - #73

Merged
JRS296 merged 1 commit into
Dijkstra-Edu:masterfrom
NEHA-AMIN:feature/next-permutation
Jul 19, 2025
Merged

Solution #31 - Neha Amin - 17/07/25#73
JRS296 merged 1 commit into
Dijkstra-Edu:masterfrom
NEHA-AMIN:feature/next-permutation

Conversation

@NEHA-AMIN

@NEHA-AMIN NEHA-AMIN commented Jul 16, 2025

Copy link
Copy Markdown
Contributor

This PR adds a solution for Leetcode Problem: Next Permutation.
The goal is to rearrange a given array of integers into the lexicographically next greater permutation of numbers.
If such an arrangement is not possible (i.e., the array is sorted in descending order), the array is rearranged to its lowest possible order (sorted in ascending order).
The implementation modifies the array in-place using an efficient O(N) algorithm that identifies the first decreasing element from the end.

@NEHA-AMIN NEHA-AMIN changed the title Solution for Next Permutation #10 -Solution for Next Permutation-Medium Jul 17, 2025
@NEHA-AMIN NEHA-AMIN changed the title #10 -Solution for Next Permutation-Medium #10 - Next Permutation-Medium Jul 17, 2025
@NEHA-AMIN
NEHA-AMIN force-pushed the feature/next-permutation branch from 05c8ebe to 44409fe Compare July 18, 2025 12:45
@NEHA-AMIN NEHA-AMIN changed the title #10 - Next Permutation-Medium Solution #31 - Next Permutation - Medium Jul 19, 2025
@NEHA-AMIN
NEHA-AMIN force-pushed the feature/next-permutation branch from 44409fe to 246f0fa Compare July 19, 2025 08:54
@NEHA-AMIN NEHA-AMIN changed the title Solution #31 - Next Permutation - Medium Solution #31 - Neha Amin - 17/07/25 Jul 19, 2025
@NEHA-AMIN
NEHA-AMIN force-pushed the feature/next-permutation branch from 246f0fa to 2e73234 Compare July 19, 2025 08:55

@JRS296 JRS296 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@JRS296
JRS296 merged commit a7250c7 into Dijkstra-Edu:master Jul 19, 2025
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.

2 participants