remove the duplicate character in a string
/*** remove the duplicate in an unsorted array and return its new length of array. adapt to any unsorted array with the template table of range table. ***/ int findIdx( string s , unordered_map < int , bool > wmap , int index ) { while ( index < s .size()) { if (! wmap [ s [ index ]]) return index ; index ++; } return index ; } int removedup( string str ) { if ( str .size() < 2) return str .size(); unordered_map < int , bool > wordmap; for ( int i=0; i<256; i++) { wor...