SyntaxFix
Write A Post
Hire A Developer
Questions
You are using the wrong iteration counter, replace inp.charAt(i) with inp.charAt(j).
inp.charAt(i)
inp.charAt(j)