Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
First Non Repeating Character
//Title of this code //V8 3.31.1 function non_repeat_char(str) { var flag = 0; arr = []; for (i=0;i<str.length;i++) arr[i]=0; for (i=0; i<str.length; i++) { for(j=i+1; j<str.length;j++) { if (str[j]==str[i]) {arr[i]=1;arr[j]=1;} } } for (i=0;i<str.length;i++) if (arr[i]==0) break; print(str[i]); } non_repeat_char('abcadfbcfdejklopadfssawer');
run
|
edit
|
history
|
help
0
class Stack
class Node
Yes
Triangle
random2
говнокод
FÜU 23.08
9
Bhbhbh
LearningJavaScript