原创 數據庫SQL實戰(牛客網):在last_update後面新增加一列名字爲create_date

存在actor表,包含如下列信息: CREATE TABLE IF NOT EXISTS actor ( actor_id smallint(5) NOT NULL PRIMARY KEY, first_name varchar(

原创 數據庫SQL實戰(牛客網):針對actor表創建視圖actor_name_view

針對actor表創建視圖actor_name_view,只包含first_name以及last_name兩列,並對這兩列重新命名,first_name爲first_name_v,last_name修改爲last_name_v: C

原创 Hadoop學習(四):資源調度管理系統YARN

YARN 簡介 YARN是Hadoop2.0引進的,前身是MapReduce本身的資源調度框架,Hadoop2.0後將MapReduce計算框架和YARN資源調度框架做了分離。 YARN 核心組件 Resources Mana

原创 LeetCode:環形鏈表2

https://leetcode-cn.com/problems/linked-list-cycle-ii/ 先判斷是否有環,然後再找環內第一個節點。 解題思路:分兩個步驟,首先通過快慢指針的方法判斷鏈表是否有環;接下來如果有環,

原创 leetcode:全排列

https://leetcode-cn.com/problems/permutations/ class Solution { public List<List<Integer>> permute(int[] nums)

原创 leetcode:部門工資最高的員工

https://leetcode-cn.com/problems/department-highest-salary/ #on -> where select d.Name Department , e.Name Employe

原创 Leetcode:連續出現的數字

https://leetcode-cn.com/problems/consecutive-numbers/ select distinct t1.Num as ConsecutiveNums from Log

原创 牛客網2019筆試真題:迷路的牛牛

迷路的牛牛 定義一個變量,遇到L自增,遇到R自減;(抵消左右轉操作) 遍歷完成後,該變量爲n,n爲正表示向左轉n步,爲負表示向右轉n步; 然後將n對4取餘(每轉四步相當於沒轉); 最後輸出結果 import java.util.S

原创 牛客網2019筆試真題:安置路燈

安置路燈 . . . . . x . x . x . . x . x x x . . x x 以上情況都是一樣的,加一個路燈即可。 import java.util.*; public class Main { publi

原创 數據庫SQL實戰(牛客網):獲取所有員工的emp_no

https://www.nowcoder.com/practice/e2dab5477fdd4ec0ba84031f8e817b8a?tpId=82&tqId=29824&tPage=3&rp=&ru=%2Fta%2Fsql&qr

原创 樹的理解(五):Trie

Trie,又稱前綴樹或字典樹,用於判斷字符串是否存在或者是否具有某種字符串前綴。 實現 Trie (前綴樹) https://leetcode-cn.com/problems/implement-trie-prefix-tree/

原创 樹的理解(四):BST

修建二叉搜索樹 https://leetcode-cn.com/problems/trim-a-binary-search-tree/description/ 二叉搜索樹特性就是對於一個節點來說,它的左子樹的節點值都比它小,右子樹

原创 樹的理解(三):遍歷

層次遍歷 https://leetcode-cn.com/problems/binary-tree-level-order-traversal/ class Solution { public List<List<Inte

原创 多線程(二):JUC理解(持續更新中)

JUC包下各種類的用法 CountDownLatch 適用場景舉例:一個線程等待其他線程完成任務後再繼續任務 門栓機制,維護一個變量,每次調用門栓的countdown()方法變量遞減,直到減至0,線程從等待中釋放。 publi

原创 數據庫SQL實戰(牛客網):獲取Employees中的first_name

獲取Employees中的first_name,查詢按照first_name最後兩個字母,按照升序進行排列 CREATE TABLE employees ( emp_no int(11) NOT NULL, birth_date