<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[aspspspsp的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/aspspspsp</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; aspspspsp]]></copyright><item><title><![CDATA[208. Implement Trie (Prefix Tree)]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77943049</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77943049</guid><author>aspspspsp</author><pubDate>Fri, 29 Jun 2018 21:55:36 +0800</pubDate><description><![CDATA[Implement a trie with insert, search, and startsWith methods.
Note:
You may assume that all inputs are consist oflowercase letters a-z.
題義:
實作一個trie樹，有插入(insert)、搜索(search)與從前綴搜索(startsWith)方法，可以假]]></description><category></category></item><item><title><![CDATA[找工作心得 part1]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/80862263</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/80862263</guid><author>aspspspsp</author><pubDate>Fri, 29 Jun 2018 21:54:26 +0800</pubDate><description><![CDATA[本人某大CS碩畢，碩班期間在搜狐焦點實習了3個月，跟板上300萬大大還有30CM大大比簡直是弱到跟渣一樣。然後在大陸與台灣分別都找了工作，首先我先分享在大陸找工作的經驗，下面則是心得與面試題目：Microsoft 北京工程院 小冰開發組 NLP InternM$大家都懂，而工程院就是將研究院研究的東西付諸實現，然後小冰就是一個對話萌妹子機器人，會唱歌做詩啥的，可以在微信加她的公眾號，跟她喇低賽。此...]]></description><category></category></item><item><title><![CDATA[445. Add Two Numbers II]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77963826</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77963826</guid><author>aspspspsp</author><pubDate>Wed, 13 Sep 2017 11:33:35 +0800</pubDate><description><![CDATA[You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return i]]></description><category></category></item><item><title><![CDATA[100. Same Tree]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77942939</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77942939</guid><author>aspspspsp</author><pubDate>Tue, 12 Sep 2017 11:10:34 +0800</pubDate><description><![CDATA[Given two binary trees, write a function to check if they are equal or not.

Two binary trees are considered equal if they are structurally identical and the nodes have the same value.



題意:
]]></description><category></category></item><item><title><![CDATA[523. Continuous Subarray Sum]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77649940</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77649940</guid><author>aspspspsp</author><pubDate>Mon, 28 Aug 2017 16:04:43 +0800</pubDate><description><![CDATA[Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of k,
 that is, sums up t]]></description><category></category></item><item><title><![CDATA[543. Diameter of Binary Tree]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77506363</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77506363</guid><author>aspspspsp</author><pubDate>Wed, 23 Aug 2017 15:14:57 +0800</pubDate><description><![CDATA[Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may n]]></description><category></category></item><item><title><![CDATA[566. Reshape the Matrix]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77483468</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77483468</guid><author>aspspspsp</author><pubDate>Tue, 22 Aug 2017 18:00:47 +0800</pubDate><description><![CDATA[In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.

You're given a matrix represented by a two-dim]]></description><category></category></item><item><title><![CDATA[563. Binary Tree Tilt]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77447393</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77447393</guid><author>aspspspsp</author><pubDate>Mon, 21 Aug 2017 11:04:57 +0800</pubDate><description><![CDATA[Given a binary tree, return the tilt of the whole tree.
The tilt of a tree node is defined as the absolute difference between the sum of all left subtree node values and the sum of all right subtree]]></description><category></category></item><item><title><![CDATA[113. Path Sum II]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77162165</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77162165</guid><author>aspspspsp</author><pubDate>Mon, 14 Aug 2017 15:26:55 +0800</pubDate><description><![CDATA[Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum = 22,
              5
             / \
      ]]></description><category></category></item><item><title><![CDATA[112. Path Sum]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77161645</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77161645</guid><author>aspspspsp</author><pubDate>Mon, 14 Aug 2017 14:54:18 +0800</pubDate><description><![CDATA[Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum]]></description><category></category></item><item><title><![CDATA[162. Find Peak Element]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77161290</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77161290</guid><author>aspspspsp</author><pubDate>Mon, 14 Aug 2017 14:32:56 +0800</pubDate><description><![CDATA[A peak element is an element that is greater than its neighbors.

Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.

The array may contain multiple peaks, in ]]></description><category></category></item><item><title><![CDATA[207. Course Schedule]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77158958</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77158958</guid><author>aspspspsp</author><pubDate>Mon, 14 Aug 2017 10:43:58 +0800</pubDate><description><![CDATA[There are a total of n courses you have to take, labeled from 0 to n
 - 1.

Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as ]]></description><category></category></item><item><title><![CDATA[94. Binary Tree Inorder Traversal]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77050916</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77050916</guid><author>aspspspsp</author><pubDate>Thu, 10 Aug 2017 14:44:46 +0800</pubDate><description><![CDATA[Given a binary tree, return the inorder traversal of its nodes' values.

For example:
Given binary tree [1,null,2,3],

   1
    \
     2
    /
   3


return [1,3,2].
Note: Recursive solution i]]></description><category></category></item><item><title><![CDATA[144. Binary Tree Preorder Traversal]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/77040811</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/77040811</guid><author>aspspspsp</author><pubDate>Thu, 10 Aug 2017 10:50:50 +0800</pubDate><description><![CDATA[Given a binary tree, return the preorder traversal of its nodes' values.

For example:
Given binary tree {1,#,2,3},

   1
    \
     2
    /
   3


return [1,2,3].
Note: Recursive solution is]]></description><category></category></item><item><title><![CDATA[關於單例模式的理解]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/76999617</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/76999617</guid><author>aspspspsp</author><pubDate>Wed, 09 Aug 2017 16:14:57 +0800</pubDate><description><![CDATA[最近面了好多家公司，幾乎都會問到有關單例模式的問題，當然基礎的單例模式大家可能都寫得出來，但面試官深入問下去呢?很可能就矇了，所以在這裡就整理幾個單例模式防止自己忘記。
單例模式是做什麼的?
根據維基百科的解釋：

單例模式，也叫單子模式，是一種常用的軟件設計模式。 在應用這個模式時，單例對象的類必須保證只有一個實例存在。 許多時候整個系統只需要擁有一個的全局對象，這樣有利於我們協調系統整]]></description><category></category></item><item><title><![CDATA[354. Russian Doll Envelopes]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/76997824</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/76997824</guid><author>aspspspsp</author><pubDate>Wed, 09 Aug 2017 15:34:36 +0800</pubDate><description><![CDATA[You have a number of envelopes with widths and heights given as a pair of integers (w, h).
 One envelope can fit into another if and only if both the width and height of one envelope is greater than]]></description><category></category></item><item><title><![CDATA[174. Dungeon Game]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/76973117</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/76973117</guid><author>aspspspsp</author><pubDate>Wed, 09 Aug 2017 10:23:15 +0800</pubDate><description><![CDATA[The demons had captured the princess (P)
 and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K)
 was initially]]></description><category></category></item><item><title><![CDATA[329. Longest Increasing Path in a Matrix]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/76922750</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/76922750</guid><author>aspspspsp</author><pubDate>Tue, 08 Aug 2017 17:54:46 +0800</pubDate><description><![CDATA[Given an integer matrix, find the length of the longest increasing path.

From each cell, you can either move to four directions: left, right, up or down. You may NOT move diagonally or move outside]]></description><category></category></item><item><title><![CDATA[71. Simplify Path]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/76886686</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/76886686</guid><author>aspspspsp</author><pubDate>Tue, 08 Aug 2017 10:32:14 +0800</pubDate><description><![CDATA[Given an absolute path for a file (Unix-style), simplify it.

For example,
path = "/home/", => "/home"
path = "/a/./b/../../c/", => "/c"


click to show corner cases.

Corner Cases:


Did]]></description><category></category></item><item><title><![CDATA[128. Longest Consecutive Sequence]]></title><link>https://blog.youkuaiyun.com/aspspspsp/article/details/76813017</link><guid>https://blog.youkuaiyun.com/aspspspsp/article/details/76813017</guid><author>aspspspsp</author><pubDate>Mon, 07 Aug 2017 10:16:18 +0800</pubDate><description><![CDATA[Given an unsorted array of integers, find the length of the longest consecutive elements sequence.

For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence is [1, 2, 3]]></description><category></category></item></channel></rss>