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

c3_Filtering_sequence - golden_middle test and solution is wrong #24

Open
martincnz opened this issue Sep 15, 2023 · 1 comment
Open

Comments

@martincnz
Copy link

In the solution:

/**
  * `number_service()` returns 300 numbers, but you only need 100 numbers, from the middle.
  */
 @Test
 public void golden_middle() {
     Flux<Integer> numbers = number_service()
             .skip(100) //this should be .skip(150) as 300/2 = 150
             .take(100)
             ;

     StepVerifier.create(numbers)
                 .expectNextMatches(i -> i >= 100) // this should be expectNextMatches(i -> i >= 100), as the middle number is 150
                 .expectNextCount(99)
                 .verifyComplete();
 }
@marcelruland
Copy link

Test and solution are correct, but the phrasing could have been clearer. The task is to take 100 numbers such that the middle of the taken interval is the middle of the entire 300 numbers. I.e. take numbers 101 to 200.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants