原创 網易2017春招實習生編程題

網易2017春招實習生編程題 說明:本文部分內容參考了網上一些大神的思路,這裏可能沒有列舉出來,實在抱歉,僅作爲學習參考。 1、雙核處理 時間限制:1秒 空間限制:32768K 一種雙核CPU的兩個核能夠同時的處

原创 LeetCode--Dynamic Programming

關於動態規劃,推薦一篇博客,寫的很詳細:http://www.cppblog.com/menjitianya/archive/2015/10/23/212084.html 303. Range Sum Query - Immut

原创 LeetCode--Sort

148. Sort List Sort a linked list in O(n log n) time using constant space complexity. 解析: (1)方法一:快速排序。鏈表排序不同於數組,

原创 使用php缺少加密擴展mcrypt等相關問題的一些解決方法

   到網上下載一個php的mcrypt模塊安裝包,只需要libmcrypt.dll文件即可(一般官網上下載的,php目錄下已經有的)    1.將libmcrypt.dll複製到system32目錄或php安裝目錄下的ext目錄下

原创 Struts學習筆記

Struts 標籤(空格分隔): SSH Struts 一、Struts基本介紹 (1)Struts基本概念 Struts是一個web框架 (2)爲什麼有struts? Struts是基於MVC的web框架,解決了MVC設計的

原创 LeetCode--Binary Search

29. Divide Two Integers Divide two integers without using multiplication, division and mod operator. If it is o

原创 LeetCode--Two Pointers

141. Linked List Cycle(判斷鏈表是否有環) Given a linked list, determine if it has a cycle in it. Follow up: Can you

原创 LeetCode--Greedy

621. Task Scheduler(任務調度) Given a char array representing tasks CPU need to do. It contains capital letters A to Z

原创 LeetCode--Divide and Conquer

215. Kth Largest Element in an Array(數組中第K大的數) Find the kth largest element in an unsorted array. Note that it is

原创 阿里2018校招筆試編程題

阿里2018秋招編程題 1、給定一個字符串S和有效單詞的字典D,請確定可以插入到S中的最小空格數,使得最終的字符串完全由D中的有效單詞組成,並輸出解。如果沒有解則應該輸出n/a 舉例: 輸入 S = “ilikealiba

原创 Python爬蟲--使用request爬取糗事百科

使用Python3+Request實現糗事百科爬蟲 import requests,threading,time,re ##糗事百科爬蟲 class Spider_QSBK: def __init__(self):

原创 LeetCode-Hash Table

(LeetCode持續更新中…) 409. Longest Palindrome(最長迴文數) Given a string which consists of lowercase or uppercase letters, f

原创 LeetCode--Bit Manipulation

關於位運算的總結,可參考這篇博客http://blog.csdn.net/black_ox/article/details/46411997 191. Number of 1 Bits(數字的二進制表示中1的數量) Write

原创 SSH連接失敗案例

案例1:Read from socket failed: Connection reset by peer (1)現象 [root@vm08 ~]# ssh 192.168.10.1 Read from socket failed

原创 guava RemovalListener失效分析

一、問題 使用Guava Cache來實現自動清理緩存中的過期數據,基本代碼如下: import com.google.common.cache.Cache; import com.google.common.cache.Cache