mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
fix(csharp): reformat csharp codes and docs (#652)
* fix(csharp): reformat the C# codes and docs * Update time_complexity.md --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@ -30,11 +30,11 @@ public class stack {
|
||||
Console.WriteLine("出栈元素 pop = " + pop + ",出栈后 stack = " + string.Join(",", stack));
|
||||
|
||||
/* 获取栈的长度 */
|
||||
int size = stack.Count();
|
||||
int size = stack.Count;
|
||||
Console.WriteLine("栈的长度 size = " + size);
|
||||
|
||||
/* 判断是否为空 */
|
||||
bool isEmpty = stack.Count() == 0;
|
||||
bool isEmpty = stack.Count == 0;
|
||||
Console.WriteLine("栈是否为空 = " + isEmpty);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user