mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-24 20:16:06 +00:00
feat(csharp) .NET 8.0 code migration (#966)
* .net 8.0 migration * update docs * revert change * revert change and update appendix docs * remove static * Update binary_search_insertion.cs * Update binary_search_insertion.cs * Update binary_search_edge.cs * Update binary_search_insertion.cs * Update binary_search_edge.cs --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
namespace hello_algo.chapter_heap;
|
||||
|
||||
public class heap {
|
||||
public void TestPush(PriorityQueue<int, int> heap, int val) {
|
||||
void TestPush(PriorityQueue<int, int> heap, int val) {
|
||||
heap.Enqueue(val, val); // 元素入堆
|
||||
Console.WriteLine($"\n元素 {val} 入堆后\n");
|
||||
PrintUtil.PrintHeap(heap);
|
||||
}
|
||||
|
||||
public void TestPop(PriorityQueue<int, int> heap) {
|
||||
void TestPop(PriorityQueue<int, int> heap) {
|
||||
int val = heap.Dequeue(); // 堆顶元素出堆
|
||||
Console.WriteLine($"\n堆顶元素 {val} 出堆后\n");
|
||||
PrintUtil.PrintHeap(heap);
|
||||
|
||||
Reference in New Issue
Block a user