Range - Coding Dojo
source link: https://codingdojo.org/kata/Range/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Range
Range has a lot of nifty issues.
- integer range contains
[2,6) contains {2,4}
[2,6) doesn’t contain {-1,1,6,10}
- getAllPoints
[2,6) allPoints = {2,3,4,5}
- ContainsRange
[2,5) doesn’t contain [7,10)
[2,5) doesn’t contain [3,10)
[3,5) doesn’t contain [2,10)
[2,10) contains [3,5]
[3,5] contains [3,5)
- endPoints
[2,6) endPoints = {2,5}
[2,6] endPoints = {2,6}
(2,6) endPoints = {3,5}
(2,6] endPoints = {3,6}
- overlapsRange
[2,5) doesn’t overlap with [7,10)
[2,10) overlaps with [3,5)
[3,5) overlaps with [3,5)
[2,5) overlaps with [3,10)
[3,5) overlaps with [2,10)
- Equals
[3,5) equals [3,5)
[2,10) neq [3,5)
[2,5) neq [3,10)
[3,5) neq [2,10)
Recommend
-
44
IntroAs the earliest, most comprehensive JavaScript framework, the Dojo Toolkit offered up intelligent building blocks for serious web developers. For example, Dojo’s very early work on deferreds and
-
42
-
10
SAFE Dojo This self-study repository is designed to allow you to experience the SAFE stack based on a ready-made application that you can build on top of. It will take around 90 minutes for you to complete if you have no experience i...
-
6
Flutter Dojo的设计之道 认识Flutter是在18年,移动端开发日趋...
-
8
Mountain View's Hacker Dojo needs community assistance Writing Software, technology, sysadmin war stories, and more. Sunday, February 5, 2012 Mountain V...
-
6
New hardware, fiddling with squelch, and the Dojo (This is the sixth post in a series. You might want to start from the beginning for context.) Part six: New har...
-
7
Running a coding dojo at Sqreen Robert Pickering ...
-
12
COZ launches Dojo, a new tech hub for Neo developers – HodlalertCOZ launches Dojo, a new tech hub for Neo developers COZ has launched
-
7
Intro of DevOps Dojo May 7th, 202...
-
11
DevOps Dojo – Experiential Learning ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK