Skip to content

Improve Stack array based algorithms #372

@JoaoVictor6

Description

@JoaoVictor6

I propose to refactor Stack ArrayBasedStack. I was reading some C# algorithms and not understand the reason for use a iteration in line 48 of ArrayBasedStack.cs . I believe this syntax is more readable:

public ArrayBasedStack(T[] items)
{
    stack = items;
    top = items.Length - 1;
}

If this refactoring makes sense, I can make this change :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions