OJ lintcode 判断字符串是否没有重复字符

实现一个算法确定字符串中的字符是否均唯一出现
您在真实的面试中是否遇到过这个题?
Yes
样例
给出"abc",返回 true
给出"aab",返回 false

class Solution {
public:
    /**
     * @param str: a string
     * @return: a boolean
     */
    bool isUnique(string &str) {
        // write your code here
        set char_set;

        for(int i=0;i

你可能感兴趣的:(OJ lintcode 判断字符串是否没有重复字符)