Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite Integer Intervals #25

Open
mohayemin opened this issue Apr 15, 2020 · 0 comments
Open

Infinite Integer Intervals #25

mohayemin opened this issue Apr 15, 2020 · 0 comments
Labels
Fundamentals Topic - OOP Fundamentals like Polymorphism, Inheritance, Encapsulation Abstraction etc Medium Difficulty Level - Medium

Comments

@mohayemin
Copy link
Contributor

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.
@mohayemin mohayemin added Fundamentals Topic - OOP Fundamentals like Polymorphism, Inheritance, Encapsulation Abstraction etc Medium Difficulty Level - Medium labels Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fundamentals Topic - OOP Fundamentals like Polymorphism, Inheritance, Encapsulation Abstraction etc Medium Difficulty Level - Medium
Projects
None yet
Development

No branches or pull requests

1 participant