The ranges for a variable are its upper and lower limits in the input. For example, if there is an array which has **N** elements, and 1$\leq$N$\leq10^5$, it means that in the input, the array will have atleast 1 and atmost 10^5 elements. This helps us in estimating the **Time Complexity** that our program, to solve the problem, must have. You can learn more about this here. For other general queries, you can refer to this.

The purpose of subtasks is to let algorithms of certain **Time Complexity** pass, and others, not.

For example, consider a problem in which you have to deal with **N** numbers, and there are two subtasks -

- 1 \leq N \leq 10^3
- 1 \leq N \leq10^5

For the first subtask, our program will successfully run even if it has a **Time Complexity** of O(N^2), while for the second one it won’t. For the second subtask, we’ll need to use a faster algorithm. Thus, if you are able to pass a certain subtask, you’ll get the points for that subtask.

Problems which have a number of test cases **T** in the input, for them, the final complexity is O(T*worst case complexity of individual test case).

Feel free to ask if you have any doubts