since the problem uses all 26 letters, we could use a number system with base as 26. 2 operations are -
1) Given number to string - Treat the number as number in base 26. 2) Given string to number. Credit goes here - http://geeksforgeeks.org/forum/topic/amazon-interview-question-for-software-engineerdeveloper-fresher-about-algorithms-data-structure-strings On Tue, Feb 1, 2011 at 6:27 PM, bittu <shashank7andr...@gmail.com> wrote: > Given a series A,B,C .......Z, AA, AB,AC,AD....AZ,BA,BB...BZ,CA.... > (Open excel sheet. The names of column represent the series). Given > input as number 'n'. Output the 'n' th string of the series. & also > vice versa if given string prints its corresponding string...e.g given > AC then its integer is 29 & given 40774 its string value is ABZ.. > > > > Thanks > Shashank > > -- > 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<algogeeks%2bunsubscr...@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.