iut-cse/OOKata

Infinite Integer Intervals

mohayemin opened this issue · 0 comments

Related Problems

#24 is prerequisite of this problem. Please do not read this problem before attempting that one.

Overview

We discussed finite intervals in #24. Now is the time to implement infinite intervals.

  1. [−∞,b] contains all numbers less than or equal to b.
  2. [−∞,b[ contains all numbers less than b.
  3. [a,+∞] contains all numbers greater than or equal to a.
  4. ]a,+∞] contains all numbers greater than a.

Examples

  1. [−∞,5] contains 2, 3, 5, -10 and -345.
  2. ]2,+∞] does not contain 2, contains 3, 5 and 1 million.

Task

Implement Infinite Integer Intervals

Note

[−∞,b] and ]−∞,b] are two different intervals. But that is not applicable for integers in a programming language which is finite.

Source


Reminders

  • React to the problem if you find it interesting and helpful. This will help others to easily identify good problems to solve.
  • Feel free to comment about the problem. Is the description unclear? Do you think it is too easy or too difficult than what is mentioned? Comment about it.
  • Discussion about the solution is OK. But do not paste a solution here. Give a link to the solution instead.
  • Do you have an interesting problem? Post it.