原创 移動端知識小匯

一.css部分 1.用transition做動畫時,變形儘量通過transform來實現,而不是用height,width等屬性。transform可明顯減少重繪、重畫 1.meta標籤 <meta name="viewport"

原创 算法系列(16)Leetcode 387 First Unique Character in a String

Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.

原创 算法系列(15)LeetCode 171

Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, return its correspondi

原创 算法系列(11)LeetCode136 Single Number

Given an array of integers, every element appears twice except for one. Find that single one. 決定以後刷題一定要記下來整個思路,方便以後看

原创 算法系列(10)LeetCode520 Detect Capital

嘿嘿,刷題刷個520~~ Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usag

原创 算法系列(8)LeetCode389

389.  Given two strings s and t which consist of only lowercase letters.

原创 算法系列(14) Leetcode 492. Construct the Rectangle

For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular we

原创 二叉樹

1. 樹:由一組以邊連接的節點組成 二叉樹:特殊的樹,子節點數不超過兩個。一個父節點的兩個子節點分別稱爲做節點和右節點。相對較小的值保存在左節點中,相對較小的值保存在右節點中。 2. 實現二叉樹 1)node類:保存數據、和其他節點的鏈接

原创 算法系列(17) Leetcode 104. Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the

原创 排序算法

1. 冒泡排序:最慢、最容易實現。將一組數字進行升序排列,較大的值會浮動到數組的右側,較小的值浮動到數組的左側。//第一次循環,開始比較當前元素與下

原创 動態規劃問題和貪心算法

啊啊啊,刺蝟書的動態規劃看的一知半解,,怎麼用!!!暈死了。。稍微做一下記錄,後面再看看會不會有更好的理解呢~ 1. 什麼是動態規劃? 與遞歸相反,從底部解決問題,將所有的小問題解決掉,然後合併成一個整體解決方案,從而解決掉整個大問題。

原创 算法系列(13) Leetcode 169 Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2

原创 Vue之實例屬性

一、 組件樹 1. $parent:用來訪問組件實例的父實例 2. $root: 用來訪問當前組件樹的根實例 3. $children:用來訪問當前組件實例的直接子組件實例 4. $refs:用來訪問v-ref指令的子組件 二、DOM訪問

原创 算法系列(12)LeetCode292 Nim Game

You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you

原创 力導向圖知識圖譜可視化(節點可點擊)

用d3.js的力導向圖寫了一個知識圖譜可視化的demo,節點可點擊着實費了我不少功夫,如果小夥伴有更簡單的方法還求留言呢~ 由於數據市實驗室的某項目,不太好直接貼出來,反正這樣的格式就好:反正是給大家參考的~ { name: "name"