原创 基於Bootstrap的響應式網頁
先來大致看看頁面的顯示效果,如圖所示(節選部分)。 這是頁面的首頁: 第一個內容塊: 第二個內容塊: 第三個內容塊的時間軸: 第四個內容塊: 第五個內容塊: 尾部(底部): 下面來進行具體分析。 整個網頁被我分成了
原创 學習JavaScript數據結構與算法(七)——散列表(二)
處理散列表中的衝突 有時候,一些鍵會有相同的散列值。不同的值在散列表中對應相同位置的時候,稱其爲衝突。 舉個例子來看,見如下代碼。其中,HashTable類的創建見博客 學習JavaScript數據結構與算法(七)——散列表(一)
原创 學習JavaScript數據結構與算法(八)——二叉樹
樹是一種分層數據的抽象模型。 現實生活中最常見的例子是家譜,或是公司的組織架構。 一個樹結構包含一系列父子關係的節點。每個節點都有一個父節點(除了頂部的第一個節點)以及零個或多個子節點。 來看下圖中的樹結構: 位於樹頂部的節
原创 基於vue-cli快速構建
Vue是近兩年來比較火的一個前端框架(漸進式框架吧),與reactjs和angularjs三國鼎立,我不是職業前端,做過Vue,瞭解了一下React,聽說過Angluar。我只能這麼說,我來晚了,沒經歷所有。閒話少說進入正題。 V
原创 【LeetCode】581. Shortest Unsorted Continuous Subarray
Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending o
原创 【LeetCode】448. Find All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear onc
原创 Node.js安裝
第一步:下載。 官方下載地址:https://nodejs.org/en/download/ 本機是windows 10 64位系統。 根據自己的系統選擇需要的安裝包。 第二步:安裝。 自行選擇安裝目錄進行安裝。 然後點擊
原创 響應式導航欄
默認的導航欄 創建一個默認的導航欄的步驟如下: 向<nav>標籤添加navbar、navbar-default類。 向<nav>標籤添加 role=”navigation”,有助於增加可訪問性。 向<div>元素添加一個標題
原创 【LeetCode】695. Max Area of Island
Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directi
原创 【LeetCode】661. Image Smoother
Given a 2D integer matrix M representing the gray scale of an image, you need to design a smoother to make the gray
原创 【LeetCode】628. Maximum Product of Three Numbers
Given an integer array,find three numbers whose product is maximum and output the maximum product. Example 1: Inpu
原创 【LeetCode】566. Reshape the Matrix
In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with differ
原创 【LeetCode】561. Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2)
原创 【LeetCode】118. Pascal's Triangle
Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5, Return [ [1
原创 【LeetCode】268. Missing Number
Given an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.