Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tiwarishashwat/InterviewCodes
/ reverse
Method
reverse
NextPermutation.java:24–30 ·
view source on GitHub ↗
(int nums[],int i,int j)
Source
from the content-addressed store, hash-verified
22
}
23
24
public
static
void
reverse(
int
nums[],
int
i,
int
j)
25
{
26
while
(i<j)
27
{
28
swap(nums,i++,j--);
29
}
30
}
31
32
}
Callers
2
nextPermutation
Method · 0.95
shortestCommonSupersequence
Method · 0.80
Calls
1
swap
Method · 0.95
Tested by
1
shortestCommonSupersequence
Method · 0.64