if you don't want to go for string operations then you can maintain the formula in char array or in linkedlist

Correct me if i m wrong.
if it will be in linked list we can swap position of every...