DEV Community

Discussion on: 24-hour coding interview prep challenge

Collapse
 
jsduniya profile image
JSDUNIYA • Edited

function uniq(str){
var y =[]
for(let char of str){
if(y.includes(char)){
return false;
}
y.push(char);
}
return true;
}

Collapse
 
jsduniya profile image
JSDUNIYA

Here I'm using only one data structure, please let me know if i'm wrong