原创 歸併排序圖文介紹

把數組左邊和右邊拆成兩個小的數組,然後用Merge函數合併: void merge(int arr[], int L, int M, int R){ int LEFT_SIZE = M-L; int RIGHT

原创 PAT——1103 Integer Factorization (30 分)

1103 Integer Factorization (30 分) The K−P factorization of a positive integer N is to write N as the sum of the P-t

原创 PAT甲級真題分類

主要考點: 樹:數的遍歷、二叉搜索樹 圖論:最短路徑、DFS、BFS 排序:快速排序、插入排序、歸併排序、堆排序 字符串:時間問題 其他:多項式問題 樹 樹的遍歷:1020、1086、1094、1119 二叉搜索樹:1043

原创 堆排序圖文介紹

堆的概念: 堆是一顆完全二叉樹 滿足父節點 > 子節點(大根堆) 完全二叉樹: 除最後一層外,都是滿二叉樹,並且最後一層節點是從左到右依次添加。 堆化調整: heapify的過程: 出現父節點小於子節點時,從中找出最大值,

原创 PAT——1130

1130 Infix Expression (25 分) Given a syntax tree (binary), you are supposed to output the corresponding infix expre

原创 PAT——1053 Path of Equal Weight(30分)(DFS遍歷樹)

1053 Path of Equal Weight (30 分) Given a non-empty tree with root R, and with weight Wi assigned to each tree node

原创 PAT——1064 Complete Binary Search Tree (30 分)(完全二叉搜索樹)

1064 Complete Binary Search Tree (30 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has th

原创 PAT——1094 The Largest Generation (25 分)(BFS遍歷樹)

1094 The Largest Generation (25 分) A family hierarchy is usually presented by a pedigree tree where all the nodes on th

原创 PAT——1018 Public Bike Management

1018 Public Bike Management (30 分) There is a public bike service in Hangzhou City which provides great convenience to

原创 PAT——1043 Is It a Binary Search Tree (25 分)(插入法構建二叉搜索樹)

1043 Is It a Binary Search Tree (25 分) A Binary Search Tree (BST) is recursively defined as a binary tree which has the

原创 PAT——1086 Tree Traversals Again (25 分)(先序+中序構建二叉樹)

1086 Tree Traversals Again (25 分) An inorder binary tree traversal can be implemented in a non-recursive way with a sta

原创 PAT——1127 ZigZagging on a Tree (30 分)(BFS遍歷樹)

1127 ZigZagging on a Tree (30 分) Suppose that all the keys in a binary tree are distinct positive integers. A unique bi

原创 CentOS64下kubernetes(k8s)的安裝

最近在做有關amino的項目,項目需要先安裝kubernetes,在此記錄下安裝過程。 1.centos7集羣環境的搭建 之前已經搭建過桌面版的centos了,現在需要搭建另一臺虛擬機,可以參考: https://blog.csdn.ne

原创 k8s集羣配置搭建

有關K8S及其依賴的安裝,見上一個博客:https://blog.csdn.net/a429367172/article/details/96426149 前期準備 建議以root登錄。 需要將節點的防火牆、SElinux和swap分區關

原创 Docker學習筆記

轉載博客: https://blog.csdn.net/ct_1020/article/details/96434290