2018年1月12日

回文序列(网易)

摘要: 题目描述 如果一个数字序列逆置之后跟原序列是一样的就称这样的数字序列为回文序列。例如:{1, 2, 1}, {15, 78, 78, 15} , {112} 是回文序列, {1, 2, 2}, {15, 78, 87, 51} ,{112, 2, 11} 不是回文序列。现在给出一个数字序列,允许使用 阅读全文

posted @ 2018-01-12 16:55 夜的第八章 阅读(260) 评论(0) 推荐(0) 编辑

Word Break(动态规划)

摘要: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For e 阅读全文

posted @ 2018-01-12 16:15 夜的第八章 阅读(198) 评论(0) 推荐(0) 编辑

Sum Root to Leaf Numbers

摘要: Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic 阅读全文

posted @ 2018-01-12 13:08 夜的第八章 阅读(89) 评论(0) 推荐(0) 编辑

Evaluate Reverse Polish Notation

摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文

posted @ 2018-01-12 10:23 夜的第八章 阅读(106) 评论(0) 推荐(0) 编辑

导航