Skip to content

Instantly share code, notes, and snippets.

@code-reaper08
Last active July 24, 2021 17:50
3rd for loop
let inpstring = "abc";
let n = inpstring.length;
function FindSubstring(Str, n){
for(let i=0; i<n ;i++){
for(let j=i;j<n;j++){
for(let k=i;k<j+1;k++){
console.log(Str.charAt(k))
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment