smoholkar / Contribute-to-HacktoberFest-2018

Contribute to hacktoberfest 2018
3 stars 32 forks source link

Rearrange characters in a string such that no two adjacent are same #21

Open smoholkar opened 5 years ago

smoholkar commented 5 years ago

Input: aaabc Output: abaca

Input: aaabb Output: ababa

Input: aa Output: Not Possible

Input: aaaabc Output: Not Possible

You can assume input is always lower case.

srivastavarnav commented 5 years ago

Hello @smoholkar  I would like to work on this!

ikhnaton commented 5 years ago

submitted PR https://github.com/smoholkar/Contribute-to-HacktoberFest-2018/pull/47