Skip to content

Instantly share code, notes, and snippets.

@code-reaper08
Created July 24, 2021 17:55
Show Gist options
  • Save code-reaper08/2829421b96383fa3546d3c11dbc7680f to your computer and use it in GitHub Desktop.
Save code-reaper08/2829421b96383fa3546d3c11dbc7680f to your computer and use it in GitHub Desktop.
Final
let inpstring = "abc";
let n = inpstring.length;
function FindSubstring(Str, n){
for(let i=0; i<n ;i++){
/* console.log(i) */
for(let j=i;j<n;j++){
for(let k=i;k<j+1;k++){
console.log(Str.charAt(k))
}
}
}
}
FindSubstring(inpstring,n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment