you have a string like sachin ramesh tendulkar and the given character by user is 'a'.then the expected output will be schin rmesh tendulkraaa-note that all the three occurrence of the character 'a' are removed from their original position and dumped at last..
you have the complexity of O(n) and only O(1) amount of extra memory is created.No extra array can be used.you have to be modified in-place
i am able to make it by two loops bt not by one and if i use count variable then it count occurrence of 'a' but not it's position if u can make then plzz...