原创 2.尾部的零

2.尾部的零 設計一個算法,計算出n階乘中尾部零的個數 樣例 11! = 39916800,因此應該返回 2 分析 兩個大數字相乘,都可以拆分成多個質數相乘,而質數相乘結果尾數爲0的,只可能是2*5。而在某個範圍內5的個數必定比2

原创 1079 三角形

1079 三角形 時間限制:500MS  內存限制:65536K 提交次數:283 通過次數:82 題型: 編程題   語言: G++;GCC Description 著名的數學家畢達哥拉斯可能從來都不曾想過有人

原创 Hexo自定義網站首頁

Hexo默認的首頁每次頁面刷新時,播放器之類會被重置,所以想法是使用iframe內聯框架,將整個頁面嵌在裏面,而自己另外定義一個主頁,將播放器放在外面,這樣就實現了在跳轉時播放器能夠繼續播放的效果,實際上仔細看網易雲官網也是這麼幹

原创 gradle配置國內鏡像

gradle配置國內鏡像 文章轉自: https://www.cnblogs.com/yangshifu/p/9801659.html Android Studio在構建項目時會拉取gradle資源,而goole和jcente

原创 關於opencv使用imshow函數閃退解決方法

關於opencv使用imshow函數閃退解決方法 將Debug x64下的附加依賴項改爲只有後綴爲d.lib的那個庫文件,去除另一個,問題就這麼解決了,雖然我也不知道加上另一個爲什麼就會閃退。。。emmm

原创 交換兩個變量的值的幾種方式

交換兩個變量的值的幾種方式 1.使用一個臨時變量 int a,b; int tmp = a; a = b; b = tmp; 2.使用+-運算 int a,b; a = a+b; b = a - b; a = a - b; 3.使用位運算

原创 Spring、springMVC、Mybatis整合

Spring、SpringMVC、Mybatis整合 工程結構 Spring 配置文件:applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns

原创 7. Serialize and Deserialize Binary Tree

7. Serialize and Deserialize Binary Tree Description Design an algorithm and write code to serialize and deserialize a

原创 按照之字形打印二叉樹

按照之字形打印二叉樹 描述 請實現一個函數按照之字形打印二叉樹,即第一行按照從左到右的順序打印,第二層按照從右至左的順序打印,第三行按照從左到右的順序打印,其他行以此類推。 Solution public class Solution {

原创 虛擬機Nat模式下ping宿主機

虛擬機Nat模式下ping宿主機 最近用xshell連接虛擬機發現連接失敗,然後發現。。。根本沒能ping通,之前只是實現了Nat模式下爲虛擬機配置靜態IP,同時使虛擬機內部各個虛擬機之間相互ping通並能訪問外網,當時似乎沒有測試與宿主

原创 springMVC返回的json中文全是問號

springMVC.xml里加上: <mvc:annotation-driven> <mvc:message-converters register-defaults="true"> <!-- 啓動

原创 11. Search Range in Binary Search Tree

11. Search Range in Binary Search Tree Description Given two values k1 and k2 (where k1 < k2) and a root pointer to a B

原创 6. Merge Two Sorted Arrays

6. Merge Two Sorted Arrays Description Merge two given sorted integer array A and B into a new sorted integer array. Ex

原创 2. Trailing Zeros

2. Trailing Zeros Description Write an algorithm which computes the number of trailing zeros in n factorial. Example 11

原创 68. Binary Tree Postorder Traversal

68. Binary Tree Postorder Traversal Description Given a binary tree, return the postorder traversal of its nodes' value