原创 leetcode_3Longest Substring Without Repeating Characters

題目: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcb

原创 leetcode_303. Range Sum Query - Immutable

題目: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Giv

原创 leetcode_257. Binary Tree Paths

題目: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: 1 / \

原创 leetcode_107. Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level

原创 opencl_1

在使用OpenCL API之前,和絕大部份所有其它的API一樣,都需要include相關的header檔案。由於在MacOS X 10.6下OpenCL的header檔案命名方式和在其它作業系統下不同,因此,通常要使用一個#ifdef來

原创 第八章課後題_1

8.3 STINGY SAT的解是屬於NP的,是可以在多項式時間內驗證的。此外,SAT問題將k設爲所有變量的總個數就可以規約到STINGY SAT。所以STINGY SAT是NP完全問題。 8.8 首先EXACT 4SAT屬於NP。其次

原创 caffe_batchnormal

bn層和scale層要一起使用,原因: batchnormal做了兩件事。1) 輸入歸一化 x_norm = (x-u)/std, 其中u和std是個累計計算的均值和方差。2)y=alpha×x_norm + beta,對歸一化後的x進行

原创 第八章課後題_2

8.10 (a)、令G成一個環,其頂點的數目與H頂點數目相同。 (b)、令g=|V| - 1 (c)、令g=子句的總數 (d)、令b=a(a+1)/2,a個頂點兩兩相連 (e)、令b=0

原创 leetcode_ Add to List 108. Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 將一個排好的數組轉換成平衡二叉樹,就是說

原创 leetcode_62. Unique Paths

題目: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can o

原创 leetcode_64. Minimum Path Sum

題目: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the

原创 leetcode_162. Find Peak Element

題目: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], fin

原创 leetcode_ Add to List 121. Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to

原创 leetcode_304. Range Sum Query 2D - Immutable

題目: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1

原创 殘差網絡

http://www.cnblogs.com/Charles-Wan/p/6535395.html http://www.cnblogs.com/Charles-Wan/p/6660077.html