when I run the code it gives errror- Line 40: Char 19: fatal error: address of overloaded function 'count' does not match required type 'int' return count; ^~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/stl_algo.h:4074:5: note: candidate template ignored: could not match 'typename iterator_traits<_InputIterator>::diffe
class Solution {
public:
int numHelper(int start, int count, string cur, string s, string t){
if(cur == t){
count++;
return count;
}
if(cur.length()==t.length() && cur == t){
return count;
}
//recursive step
int i;
for(i=start; i<s.length(); i++){
numHelper(i+1, count, cur + s[i] , s, t);
numHelper(i+1, count, cur , s, t);
}
return 0;
}
int numDistinct(string s, string t) {
numHelper(0, 0, "", s, t);
return count;
}
};