I am facing some problems while solving problems of DS algo..I am able to solve easy and most of the medium questions. But when I am trying to solve hard problems or harder medium problems I am unable to build complete logic although I am thinking in right direction...like .. for most of the hard problems after brain storming for sometime (and failing to solve ) when I am seeing the solution I find out that the solution is an extension of what I thought. So It's not that I am not able to think properly. It's just that I am unable to get to the solution completely on my own.
Someone please help me.