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

18/19 SEM1 Q3: #410

Open
tyc001 opened this issue Apr 28, 2021 · 2 comments
Open

18/19 SEM1 Q3: #410

tyc001 opened this issue Apr 28, 2021 · 2 comments
Labels
🧠 Finals Q&A Questions related to Finals

Comments

@tyc001
Copy link

tyc001 commented Apr 28, 2021

Hello friends is there any way to do this without creating a whole new class to encapsulate a max and a min?

Screenshot (2)

@tyc001 tyc001 added the 🧠 Finals Q&A Questions related to Finals label Apr 28, 2021
@jordanwwb
Copy link

#397 and #364
you can refer to these threads

@lyntan01
Copy link

I guess one way would be to collect the stream into a list so that it can be reused, then convert that list to a stream twice, once to find the max and once to find the min

But this question bans the use of Java collections, so the stream can only be used once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧠 Finals Q&A Questions related to Finals
Projects
None yet
Development

No branches or pull requests

3 participants