SHARE
TWEET

Untitled

a guest Nov 19th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. array = stringToArray(string);
  2.  
  3. string char1;
  4. string char2;
  5. string char3;
  6.  
  7. std::map<char,int> groupingsMap;
  8.  
  9. for(i = 0, i < arrayLength, i++){
  10.     char1 = array[i];
  11.     for(j = 0, j < arrayLength, j++){
  12.         char2 = array[j];
  13.         for(k = 0, k < arrayLength, k++){
  14.             char3 = array[k];
  15.            
  16.             string grouping = char1 + char2 + char3;
  17.  
  18.             if(groupingsMap::find(grouping)){
  19.                 groupingsMap[grouping] += groupingsMap[grouping];
  20.             }else{
  21.                 groupingsMap[grouping] = 1;
  22.             }
  23.         }
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top