@all I Went Through Similar Question Some Times back,i hope piyesh used the same idea, have a look @ Naive & efficient Algorithm for doing the same.
http://shashank7s.blogspot.com/2011/06/wap-to-output-all-intervals-i-j-where.html * **Regards Shashank Mani "Computer Science Is Awesome So Why I Write Code" Computer Science Birla institute of Technology Mesra * -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/tZZxNv9-OzgJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.