Date: Sat, 22 Feb 2025 11:01:13 -0800
There might be a case for an algorithm and/or data structure that looks
like a stack/queue type mechanism that has an iterator but not every
algorithm and/or data structure has to have every mechanism nor does it
need to solve every problem and it does not need to be in the library.
If an algorithm and/or a data structure is not built into a library, that
is why we have the ability to write our own algorithms and/or data
structures.
I am in the camp of keeping the library simple and clean of kitchen sink
features/solutions. Afterall they are called generics.
<personal trigger>
Citing a leetcode problem as the justification is not a valid reason.
P.S. I love solving problems but I hate the whole leetcode culture.
</personal trigger>
On Sat, Feb 22, 2025 at 10:25 AM Ell via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> This could be occasionally nice to have, especially if it worked with
> other adaptors as well. Some random examples:
>
> Finding the area of the largest rectangle under a histogram [1] can be
> solved with a monotonic stack. Before pushing a new element, the
> discarded elements could be processed as a range:
>
[...]
> [1] https://leetcode.com/problems/largest-rectangle-in-histogram/
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
like a stack/queue type mechanism that has an iterator but not every
algorithm and/or data structure has to have every mechanism nor does it
need to solve every problem and it does not need to be in the library.
If an algorithm and/or a data structure is not built into a library, that
is why we have the ability to write our own algorithms and/or data
structures.
I am in the camp of keeping the library simple and clean of kitchen sink
features/solutions. Afterall they are called generics.
<personal trigger>
Citing a leetcode problem as the justification is not a valid reason.
P.S. I love solving problems but I hate the whole leetcode culture.
</personal trigger>
On Sat, Feb 22, 2025 at 10:25 AM Ell via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> This could be occasionally nice to have, especially if it worked with
> other adaptors as well. Some random examples:
>
> Finding the area of the largest rectangle under a histogram [1] can be
> solved with a monotonic stack. Before pushing a new element, the
> discarded elements could be processed as a range:
>
[...]
> [1] https://leetcode.com/problems/largest-rectangle-in-histogram/
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2025-02-22 19:01:25