In java you can do this, take O(n) time. Is that correct? -Adi
public class ReverseString { public static void main(String[] args){ String name = "Aditya"; String reverse = ""; for(int i=0;i<name.length();i++){ System.out.println(name.charAt(i) + reverse); reverse = name.charAt(i) + reverse; } } } On Sat, May 28, 2011 at 6:40 AM, abc abc <may.i.answ...@gmail.com> wrote: > *Given an array of characters. How would you reverse it. ? How would you > reverse it without using indexing in the array.* > * > * > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.