原创 找出給定數組中兩個元素和剛好等於給定目標值的最小下標,時間複雜度要求O(n)

題目要求: 找出給定數組中兩個元素和剛好等於給定目標值的最小下標,時間複雜度要求O(n) 例如: 輸入數組  [5, 4, 6, 7, 8, 11],  目標值 19 返回 4,5;   所有代碼均可在Github中找到: 下載鏈接  

原创 LeetCode --- 762. Prime Number of Set Bits in Binary Representation 解題報告

Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits

原创 Python 實戰深拷貝與淺拷貝

說在前面 我們在談拷貝之前,是不是得想一下,拷貝和賦值、引用之間的關係; 拷貝 == 賦值? 拷貝 == 引用? 賦值 == 引用? 基礎例子: 假如我們有兩個變量a 、b,其中a是一個引用,b也是一個引用

原创 LeetCode --- 748. Shortest Completing Word 解題報告

Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Suc

原创 數據倉庫學習筆記 --- 緩慢變化維

什麼是緩慢變化維? 在維度建模的數據倉庫中,有一個概念叫做Slowly Changing Dimensions,中文翻譯叫做緩慢變化維,一般縮寫爲SCD; 緩慢變化維的提出是因爲在現實世界中,維度的屬性並不是靜態的,它會隨着時

原创 Azkaban執行目錄產生小文件過多導致的問題

某天早上集羣報警,磁盤、內存等報警,我一看發現如下圖     某個目錄已經使用了100%,剩餘0;   然後我快速定位到了Azkaban出現了問題,某個目錄下存有大量歷史文件;     該目錄就是Azkaban的安裝目錄下 /xxxx

原创 LeetCode --- 746. Min Cost Climbing Stairs 解題報告

On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can e

原创 LeetCode --- 747. Largest Number At Least Twice of Others 解題報告

In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the arr

原创 數據倉庫Build The Data Warehouse(William H.Inmon)學習筆記 --- 第三章、設計數據倉庫

零、 建設企業數據倉庫主要兩個方面? 與操作型系統接口的設計 數據倉庫本身的設計 建造數據倉庫時發生了什麼? 首先載入一部分數據,供DSS分析員使用和查看。然後根據最終用戶的反饋,在數據倉庫中修改、增添一些數

原创 LeetCode --- 744. Find Smallest Letter Greater Than Target 解題報告

Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the

原创 誤刪了Crontab調度信息怎麼辦?如何找回調度時間?

最近最近的某天發現Crontab日常的調度信息不見了。 那麼這種很棘手並沒有沒有備份的情況下怎麼辦呢?   解決辦法: 1.找到調度的腳本; 2.找到調度的日期/頻率;   1.我們先去找到crontab的默認日誌路徑(Cento

原创 LeetCode --- 728. Self Dividing Numbers 解題思路

A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing nu

原创 LeetCode --- 733. Flood Fill 解題報告

An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 6

原创 LeetCode --- 724. Find Pivot Index 解題報告

Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index

原创 LeetCode --- 720. Longest Word in Dictionary 解題報告

Given a list of strings words representing an English Dictionary, find the longest word in words that can be built one