Facebook Interview Question for SDE1s
- 0of 0 votes
* Given a string on length N. You can swap only the adjacent elements- ajay.raj October 02, 2017 in United States
and each element can be swapped atmost once.
Find the no of permutations of the string that can be generated after
performing the swaps as mentioned.
string – “12345”
Ans = 8
Explanations- (All the permutations)
| Report Duplicate | Flag | PURGE
Open Chat in New Window