原创 LeetCode-18:4 Sum (四數的和)

題目:4 Sum Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such th

原创 LeetCode-300:Longest Increasing Subsequence (最長遞增子序列)

題目: Given an unsorted array of integers, find the length of longest increasing subsequence. 例子 Given [10, 9, 2, 5,

原创 吳恩達 深度學習 編程作業(5-3)Part 1 - Neural Machine Translation

吳恩達 Coursera 課程 DeepLearning.ai 編程作業系列,本文爲《序列模型》部分的第三週“序列模型和注意力機制”的課程作業——第一部分:機器翻譯。 另外,本節課程筆記在此:《吳恩達Coursera深度學習課程

原创 吳恩達Coursera深度學習課程 DeepLearning.ai 提煉筆記(5-3)-- 序列模型和注意力機制

作者: 大樹先生 博客: http://blog.csdn.net/koala_tree 知乎:https://www.zhihu.com/people/dashuxiansheng GitHub:https://git

原创 網易2019:矩形重疊

題目: 平面內有n個矩形, 第i個矩形的左下角座標爲(x1[i], y1[i]), 右上角座標爲(x2[i], y2[i])。 如果兩個或者多個矩形有公共區域則認爲它們是相互重疊的(不考慮邊界和角落)。 請你計算出平面內重疊矩形數

原创 LeetCode-15、16:3Sum & 3Sum Closest(三數的和)

題目:3 Sum Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all un

原创 LeetCode-228:Summary Ranges (總結範圍)

題目: Given a sorted integer array without duplicates, return the summary of its ranges. 例子 Example 1: Input: [0,1,2,

原创 LeetCode-72:Edit Distance (編輯距離)

題目: Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You

原创 二叉樹的層次遍歷 & 深度

題目:二叉樹的層次遍歷 層序遍歷就是按二叉樹從上到下,從左到右依次打印每個節點中存儲的數據。 思路標籤: 數據結構:隊列 解答: 二叉樹的層次遍歷滿足隊列先入先出的規則; 每次訪問隊列頭部節點,將其出隊列,並將其左右子節點分

原创 二叉樹的垂直遍歷

題目:二叉樹的垂直遍歷 Given a binary tree, return the vertical order traversal of its nodes’ values. (ie, from top to bottom,

原创 吳恩達 深度學習 編程作業(5-3)Part 2 - Trigger word detection

吳恩達 Coursera 課程 DeepLearning.ai 編程作業系列,本文爲《序列模型》部分的第三週“序列模型和注意力機制”的課程作業——第三部分:觸發字檢測。 另外,本節課程筆記在此:《吳恩達Coursera深度學習課程

原创 網易2019:迷路的牛牛&被3整除

題目:迷路的牛牛 牛牛去犇犇老師家補課,出門的時候面向北方,但是現在他迷路了。雖然他手裏有一張地圖,但是他需要知道自己面向哪個方向,請你幫幫他。 輸入描述: 每個輸入包含一個測試用例。 每個測試用例的第一行包含一個正整數

原创 網易2019:安置路燈

題目: 小Q正在給一條長度爲n的道路設計路燈安置方案。 爲了讓問題更簡單,小Q把道路視爲n個方格,需要照亮的地方用’.’表示, 不需要照亮的障礙物格子用’X’表示。 小Q現在要在道路上設置一些路燈, 對於安置在pos位置的路燈,

原创 LeetCode-69:Sqrt(x) (整數的平方根)

題目: Implement int sqrt(int x). Compute and return the square root of x, where x is guaranteed to be a non-negative

原创 LeetCode-198 & 213:House Robber (房屋搶劫)

題目198:House Robber You are a professional robber planning to rob houses along a street. Each house has a certain am