Alan Zhan 部落格

Live for nothing, or die for something

白話解 Leetcode - 23 Merge k Sorted Lists

23. Merge k Sorted Lists https://leetcode.com/problems/merge-k-sorted-lists/ HardYou are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the …

白話解 Leetcode - 200 Number of Islands

200. Number of Islands https://leetcode.com/problems/number-of-islands/ MediumGiven an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. …

白話解 Leetcode - 78 Subsets

78. Subsets https://leetcode.com/problems/subsets/ MediumGiven an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate …

白話解 Leetcode - 111 Minimum Depth of Binary Tree

111. Minimum Depth of Binary Tree https://leetcode.com/problems/minimum-depth-of-binary-tree/ EasyGiven a binary tree, find its minimum depth. The minimum depth is the number of nodes along the …

白話解 Leetcode - 104 Maximum Depth of Binary Tree

104. Maximum Depth of Binary Tree https://leetcode.com/problems/maximum-depth-of-binary-tree/ EasyGiven the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the …

如何在贏者全拿的職場中生存

贏者全拿,從字面上的大家應該就會懂了,在我們生活中也時常發生,舉一個最簡單的例子:在民主社會中,每幾年就會有一次總統大選,只有獲得最高票的那個人可以勝出擔任下一任的總統,第二名與第三名好像就沒那麼重要;在情場上,每位男生都可以去追求新垣結衣,然後最終勝出的就只為有一位,在運動場上,在公司,在任何地方,大部分的場景都是贏者全拿的。

白話解 Leetcode - 226 Invert Binary Tree

226. Invert Binary Tree https://leetcode.com/problems/invert-binary-tree/ EasyGiven the root of a binary tree, invert the tree, and return its root.   Example 1: Input: root = [4,2,7,1,3,6,9] …

Kubernetes 核心介紹 Scheduler

Scheduler 嚴格算起來,算是特殊的 Controller,工作原理與其他控制器無差別。 Scheduler 的特殊職責在於監控當前集群所有未調度的 Pod,並且獲取當前集群的所有節點健康狀況和資源使用情控,為待調度的 Pod 選擇最佳節點,完成調度。

Kubernetes 核心介紹 Api Server

API Server kube-apiserver 是 Kubernetes 最重要的核心組件之一,主要提供以下功能: 提供集群管理的 REST API ,包括認證、授權、數據檢驗以及集群狀態變更等 認證 Authentication 授權 Authorization 准入 Admission (Mutating & Valiating) 提供其他模組之間的數據交互和通訊的樞紐,其他模組只 …

Mongodb Index 最佳實踐

自上一篇在實際的 Porduction 發生了 sorted operation oom 的問題之後,才意識到自己對於 mongodb Index 的掌握度沒有那麼高,於是開始餵關鍵字給 google 查了好久才終於整理出一些重點,有一些重點在上一篇,可以到上一篇複習一下 MongoDB Sorted Operation OOM。