1.Please remove all the unused libs for every files

2.add a file header for all the files
This commit is contained in:
zhuzhiqing
2022-12-23 18:28:17 +08:00
parent a427cb1b4d
commit 7b538ce21c
27 changed files with 175 additions and 103 deletions

View File

@ -1,6 +1,10 @@
/**
* File: stack.cs
* Created Time: 2022-12-23
* Author: haptear (haptear@hotmail.com)
*/
using NUnit.Framework;
using System.Collections.Immutable;
namespace hello_algo.chapter_stack_and_queue
{
@ -18,7 +22,7 @@ namespace hello_algo.chapter_stack_and_queue
stack.Push(2);
stack.Push(5);
stack.Push(4);
Console.WriteLine("栈 stack = " + String.Join(",", stack.ToImmutableArray()));
Console.WriteLine("栈 stack = " + string.Join(",", stack.ToArray()));
/* 访问栈顶元素 */
int peek = stack.Peek();
@ -26,7 +30,7 @@ namespace hello_algo.chapter_stack_and_queue
/* 元素出栈 */
int pop = stack.Pop();
Console.WriteLine("出栈元素 pop = " + pop + ",出栈后 stack = " + String.Join(",", stack.ToImmutableArray()));
Console.WriteLine("出栈元素 pop = " + pop + ",出栈后 stack = " + string.Join(",", stack.ToArray()));
/* 获取栈的长度 */
int size = stack.Count();