Click to See Complete Forum and Search --> : Algorithm to produce sum of values grouped by Initials


harshadp
February 25th, 2009, 04:45 PM
Hi All,

I have a following combination :

"John Smith", 34

"Chris Doe", 56

"Jane Sond", 54

"Bob Bourne",41


I want to display output like :

"JS" 88 [JS is combination of first letters of First Name & Last Name and 88 is 34+54
as both are having similar initials]

"CD" 56

"BB" 41

Any idea how can I write algorithm for this ?

Thanks in advance.