原创 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

原创 714. Best Time to Buy and Sell Stock with Transaction Fee

Your are given an array of integers prices, for which the i-th element is the price of a given stock on day i;

原创 532. K-diff Pairs in an Array

Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here

原创 565. Array Nesting

A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of s

原创 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

原创 287. Find the Duplicate Number

Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at

原创 53. Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For examp

原创 通過noVNC和websockify連接到QEMU/KVM

開源項目 QEMU、KVM、libvirt 實現了創建虛擬機,啓動虛擬機,監控虛擬機。我們解決了從無到有的問題,這時就該考慮從有到優了。儘管我們能使用 SSH 的方式來登錄使用虛擬機,但這種方式從感覺欠缺點什麼,用戶往往會更喜歡絢

原创 35. Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where i

原创 665. Non-decreasing Array

題目描述: 給定一個有n個整數的數組,檢查它是否可以通過修改最多一個元素使它變得非遞減數組 Given an array with n integers, your task is to check if it could bec

原创 189. Rotate Array

Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7

原创 561. Array PartitionI

Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2

原创 計算機組成原理-漢明碼相關計算

今天覆習計算機組成原理中看到了漢明碼的計算,其中有些知識書上沒有完全講到,我這裏根據自己的複習梳理下計算的幾個方法。 檢測位的小組 首先檢測位的小組的劃分書上說的有點不好理解,這裏一種比較容易的理解方法是: C1:小組中的數最後

原创 Ubuntu 刪除虛擬網卡/網橋的命令

ubuntu下刪除虛擬網卡/網橋的命令 刪除虛擬網卡 tunctl -d <虛擬網卡名> 刪除虛擬網橋 ifconfig <網橋名> down brctl delbr <網橋名> 將網卡tap0, eth0 移出bri

原创 計算機組成原理-原碼, 反碼和補碼

本篇文章講解了計算機的原碼, 反碼和補碼. 並且進行了深入探求了爲何要使用反碼和補碼, 以及更進一步的論證了爲何可以用反碼,補碼的加法計算原碼的減法. 論證部分如有不對的地方請各位牛人幫忙指正! 希望本文對大家學習計算機基礎有所