Katamaran
BAN USER#include <iostream>
#include <algorithm>
#include <string>
#include <unordered_map>
using namespace std;
void printPalindromePairs(string words[], unsigned int size) {
unordered_map<string, int> wordMap;
for (unsigned int i = 0; i < size; i++) {
string word = words[i];
reverse(word.begin(), word.end());
unordered_map<string, int>::iterator it = wordMap.find(word);
if (it == wordMap.end()) {
wordMap[words[i]] = i;
}
else {
cout << "FOUND : " << words[i] << ", " << word << endl;
wordMap.erase(it);
}
}
}
int main() {
string words[] = {"bat", "cat", "ami", "tac", "tab"};
printPalindromePairs(words, 5);
return 0;
}
Repsochnimrana138, Animator at ABC TECH SUPPORT
I am TroyMitchell . I am working in Rhodes Furniture as a machine operator . I have excellent experience in cutting , punching ...
RepYaritzaLewis, abc at 8x8
I am working as a receptionist in a Softage company. I work with the HR department to facilitate recruitment drives ...
Repkristenjjimenezk, Analyst at ADP
We Statistical assistants establish and check numerical facts in many different areas of business, government, and industry. Right now I ...
RepGlennaJames, Android test engineer at Accenture
Glenna , an illustrator for more than 8 years in California . I also feel I could have an actual understanding of ...
RepSydneyLevy, Area Sales Manager at 247quickbookshelp
I am a highway patrol officerIn the highway patrol is the part of the police force within a particular state ...
RepIsabellaRoy, Android Engineer at 8x8
I have excellent reporting and interviewing skills and award-writing techniques. I compose a variety of stories for print news and ...
RepSailzaNoel, Front-end Software Engineer at Athena Health
I am Sailza , licensed by the state of Texas under the auspices of the Texas Department of Health’s Board ...
RepAndreTmily, Area Sales Manager at Axiom Sources
A purchasing manager, also known as a purchasing director or supply manager, responsible for procuring goods and services for resale ...
RepAdyaKing, Java Experienced at ADP
I am a friendly and outgoing person who enjoys greeting people with a smile. I have more than 5 years ...
RepJanaSmith, Integration Software Engineer at Deloitte Consulting LLP
I am Jana , an order processor with my strong work ethic. My interests are listening to music which helps me ...
Repcloptonchirsty, Android Engineer at 8x8
Hello, I am an Organic chemist and my all study and degree is complete from New York.Apart from this ...
RepNaomiSmith, Integration Software Engineer at ASU
Naomi , a strategic Merchandise Buyer with over 4 years of professional experience in merchandise planning and purchasing positions. Advanced presentation ...
RepNancy , a Homemaker manages the household of the various families. I love to explore astrology so I recently took help ...
RepGladysHenley, Blockchain Developer at ASU
Gladys , a Staffing Consultant adept at managing the whole lifecycle of candidate recruitment, organizing job fairs, workshops, and webinars, and ...
RepSidneyWarren, Development Support Engineer at Abs india pvt. ltd.
Sidney , Materials Planner adept at analyzing the usage of production materials, managing inventories, coordinating new personnel vashikaran specialist contact number ...
RepKeilyPrice, Applications Developer at 247quickbookshelp
I am a creative chef with 5 years of experience making the kitchen run efficiently. Collaborated with marketing specialists to ...
I think this wont work in all cases. Consider "bcabc" - The algorithm will give us "bac", where as the right solution is "abc".
- Katamaran September 14, 2015