Problem statement: Write a program to find perfect squares in a given sequence of numbers. The input is a sequence of numbers such n, n+1, n+2.......x such that n < x. The program should find all the perfect squares between n and x.
Solution: Following assumptions are made while devising the solution -
- n and x are positive numbers
- For brevity, n and x are accepted as input and the intermediate sequence (n+1, n+2.....x-1) is auto-generated
- There's infinite resources available for executing this program
- Time and space complexity are not considered