该文被密码保护。 阅读全文
posted @ 2019-02-26 01:45 Sherry_Yang 阅读(1) 评论(0) 推荐(0) 编辑
摘要: Easy: -- 直接写,bug-free Medium: -- 与实际面试重合较多,重点刷,分专题,要多刷熟练! Hard: -- 出现的题目涉及的算法有了解 【journey】 From 2018/1/5 刷题的解题思路要清晰 2018/1/14 【12题】 链表,指针,vector 【refe 阅读全文
posted @ 2018-01-05 09:03 Sherry_Yang 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the d 阅读全文
posted @ 2020-02-26 06:07 Sherry_Yang 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
posted @ 2019-08-30 11:10 Sherry_Yang 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any 阅读全文
posted @ 2019-08-28 04:40 Sherry_Yang 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 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 complete at most one transaction 阅读全文
posted @ 2019-05-08 03:17 Sherry_Yang 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 其实也米有很难……只是c++11的api这么好用的吗 Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get  阅读全文
posted @ 2019-05-04 03:37 Sherry_Yang 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s 阅读全文
posted @ 2019-05-02 23:44 Sherry_Yang 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 给一个不包含'0'和'1'的数字字符串,每个数字代表一个字母,请返回其所有可能的字母组合。 下图的手机按键图,就表示了每个数字可以代表的字母。 阅读全文
posted @ 2019-05-01 03:37 Sherry_Yang 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Example 2: 阅读全文
posted @ 2019-05-01 03:09 Sherry_Yang 阅读(113) 评论(0) 推荐(0) 编辑
摘要: On a staircase, the i-th step has some non-negative cost cost[i]assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Yo 阅读全文
posted @ 2019-04-26 05:13 Sherry_Yang 阅读(114) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh 阅读全文
posted @ 2019-04-26 02:50 Sherry_Yang 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Given an array equations of strings that represent relationships between variables, each string equations[i] has length 4 and takes one of two differe 阅读全文
posted @ 2019-04-26 02:37 Sherry_Yang 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 分节: \section{Supplemental Material}\label{sec:supplemental} 小节: \noindent {\bf Preparing References:} 效果为—— Preparing References: 后续文字 小小节: {\bf Citat 阅读全文
posted @ 2019-03-11 10:16 Sherry_Yang 阅读(187) 评论(0) 推荐(0) 编辑
摘要: python: 1. print理解流程 print('xy1') print('xy2') 可以更好地跟踪函数的执行流程,分析代码 2. 用python库 import pdb; pdb.set_trace() 加在某段代码前面 终端部分写 p ....表示print... 阅读全文
posted @ 2018-12-31 08:04 Sherry_Yang 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 涉及卡特兰数的题目列举,也是组合数学中一些例子: 详解链接 https://zh.wikipedia.org/wiki/%E5%8D%A1%E5%A1%94%E5%85%B0%E6%95%B0 1. n个节点的二叉树有多少种形态? Cn表示有2n+1个节点组成不同构满二叉树(full binary 阅读全文
posted @ 2018-12-30 08:26 Sherry_Yang 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 转载https://blog.csdn.net/myan/article/list 自孟岩老师 原文网址: http://blog.csdn.net/myan/archive/2006/04/02/647511.aspx http://blog.csdn.net/myan/archive/2006/ 阅读全文
posted @ 2018-08-07 10:02 Sherry_Yang 阅读(835) 评论(0) 推荐(0) 编辑
摘要: -正交初始化->解决梯度消失/爆炸 - 使用ReLU激活函数->解决梯度消失 - 对梯度进行剪切(gradient clipping)->解决梯度爆炸 - 引入更复杂的结构,例如LSTM、GRU->解决梯度消失 阅读全文
posted @ 2018-07-24 00:11 Sherry_Yang 阅读(143) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2018-07-23 15:07 Sherry_Yang 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 这可能是一个很长的blog…… 如果不需要存所有的最长公共子串结果,可以把lcs_set变为字符串。 获取string中的最长回文字符串还可以使用寻找两个字符串最长公共substring的方法解答: 1. s1=‘给定字符串’ 2. s2=‘给定字符串的反序’ 3. 比较s1与s2, 获取两个字符串 阅读全文
posted @ 2018-07-18 17:07 Sherry_Yang 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 今天开始读一篇论文:leveraging linguistic structure for open domain information extraction 于是……重新复习了很多句法分析的内容,转载一个关键词的解释(?https://blog.csdn.net/lihaitao000/arti 阅读全文
posted @ 2018-05-19 19:14 Sherry_Yang 阅读(11562) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/yanlingyin/archive/2011/11/14/2247594.html https://www.cnblogs.com/dmego/p/5965835.html 阅读全文
posted @ 2018-04-25 16:04 Sherry_Yang 阅读(139) 评论(0) 推荐(0) 编辑
摘要: ~~收集的面经~~ 1. 实现hashtable的put 和get操作 参考:https://yikun.github.io/2015/04/01/Java-HashMap%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86%E5%8F%8A%E5%AE%9E%E7%8E%B0/ 阅读全文
posted @ 2018-04-24 17:18 Sherry_Yang 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 完全没有准备的一次面试……意外 两部分:Word2vec + 中位数 (还有聊对科研的想法和自己研究能力的评价? 如何找出一个整数数组的中位数: partition函数找中位数的写法(做递归之前要判断): 求第k大数的时候,pivot的不满足条件的那一侧数据不需要再去处理了,平均时间复杂度为O(N+ 阅读全文
posted @ 2018-04-16 15:47 Sherry_Yang 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 求集合不重复的子集: 下面python的写法很好啊! 其他的详细参考:https://blog.csdn.net/happyaaaaaaaaaaa/article/details/51604217 阅读全文
posted @ 2018-04-03 23:00 Sherry_Yang 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Examples: Input: S = "a1b2" Output: ["a1b2", "a1B2", "A1b2", "A1B2"] Input: S = "3z4" Output: ["3z4", "3Z4"] Input: S = "12345" Output: ["12345"] class Solution { public: vector letterCasePermu... 阅读全文
posted @ 2018-04-03 20:39 Sherry_Yang 阅读(393) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. 阅读全文
posted @ 2018-03-01 20:25 Sherry_Yang 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 以空格为分隔符,判断一个string可以被分成几部分。 注意几种情况:(1)全都是空格 (2)空字符串(3)结尾有空格 思路: 只要统计出单词的数量即可。那么我们的做法是遍历字符串,遇到空格直接跳过,如果不是空格,则计数器加1,然后用个while循环找到下一个空格的位置,这样就遍历完了一个单词,再重 阅读全文
posted @ 2018-02-19 23:11 Sherry_Yang 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1 Example 2 阅读全文
posted @ 2018-02-19 23:09 Sherry_Yang 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 题意大概是,找两个节点的最低公共祖先 阅读全文
posted @ 2018-02-19 19:03 Sherry_Yang 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目一: 一个极其简单的动态规划。 参考一个很好的blog:http://www.cnblogs.com/grandyang/p/4383632.html 题目二:形成环 参考一个很好的blog:https://www.cnblogs.com/grandyang/p/4518674.html 题目三 阅读全文
posted @ 2018-02-19 11:56 Sherry_Yang 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 我们可以将上述代码写的更加简洁一些,用两个哈希表,分别记录p的字符个数,和s中前p字符串长度的字符个数,然后比较,如果两者相同,则将0加入结果res中,然后开始遍历s中剩余的字符,每次右边加入一个新的字符,然后去掉左边的一个旧的字符,每次再比较两个哈希表是否相同即可,参见代码如下: 解法二: 下面这 阅读全文
posted @ 2018-02-17 22:27 Sherry_Yang 阅读(160) 评论(0) 推荐(0) 编辑
摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2018-02-17 20:18 Sherry_Yang 阅读(132) 评论(0) 推荐(0) 编辑
摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2018-02-17 20:17 Sherry_Yang 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 判断一棵树中是否包含另一棵子树(包含是,两棵树重合处的根节点之下的子节点都相等) 有两种方法: 方法二:递归写法 方法一:比较两个字符串 https://www.cnblogs.com/zfyouxi/p/4074592.html 介绍ostringstream. 阅读全文
posted @ 2018-02-17 16:41 Sherry_Yang 阅读(162) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/dolphin0520/p/3919839.html (这个系列的博客都很好啊……) 阅读全文
posted @ 2018-02-13 11:39 Sherry_Yang 阅读(83) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/dolphin0520/p/3778589.html 阅读全文
posted @ 2018-02-13 11:30 Sherry_Yang 阅读(110) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/crazy1235/article/details/51474128 花样做二叉树的题……居然还是不会么…… 阅读全文
posted @ 2018-02-13 08:54 Sherry_Yang 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 非常简单的题:判断链表有没有环(用快慢指针) 阅读全文
posted @ 2018-02-12 22:39 Sherry_Yang 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 按层输出二叉树,广度优先。 阅读全文
posted @ 2018-02-12 22:31 Sherry_Yang 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 判断一棵二叉树是否对称 阅读全文
posted @ 2018-02-12 22:00 Sherry_Yang 阅读(92) 评论(0) 推荐(0) 编辑