https://https://ide.codingblocks.com/s/385760
leetcode.com/problems/perfect-squares/
Help me out in this
logic and code both are correct the error is due to dp array which should not be declared globally .only change you have to make is pass dp array along.that ll pass all the test case Hope this helps