Https://ide.codingblocks.com/s/121999

passing only 1 testcase

Hi tushar , the code that you wrote in that the second loop in function target with index ā€˜jā€™ is running till arr.length-1 which means ā€˜jā€™ never takes the value arr.length-1.Hence,this loop does not check the last element of your array.