-
Notifications
You must be signed in to change notification settings - Fork 99
Added C# solutions for Chapter 7: Stacks #84
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
Added C# solutions for Chapter 7: Stacks #84
Conversation
csharp/Stacks/Queue.cs
Outdated
@@ -0,0 +1,42 @@ | |||
public class Queue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename the file to ImplementAQueueUsingAStack please? It's ok if the file doesn't compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
csharp/Stacks/Queue.cs
Outdated
return _dequeueStack.Count > 0 ? _dequeueStack.Peek() : null; | ||
} | ||
|
||
public void transferEnqueueToDequeue() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a capital T
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
csharp/Stacks/Queue.cs
Outdated
_dequeueStack = new Stack<int>(); | ||
} | ||
|
||
public void Enqueue(int x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reorder the functions to match the ordering here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR aims to add C# solutions for all the problems from Chapter 7: Stacks