上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 30 下一页

2018年1月7日

decode ways(动态规划)

摘要: A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t 阅读全文

posted @ 2018-01-07 17:48 夜的第八章 阅读(124) 评论(0) 推荐(0) 编辑

word search(二维数组中查找单词(匹配字符串))

摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文

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

2018年1月6日

下厨房(网易)

摘要: 题目描述 牛牛想尝试一些新的料理,每个料理需要一些不同的材料,问完成所有的料理需要准备多少种不同的材料。 输入描述: 每个输入包含 1 个测试用例。每个测试用例的第 i 行,表示完成第 i 件料理需要哪些材料,各个材料用空格隔开,输入只包含大写英文字母和空格,输入文件不超过 50 行,每一行不超过 阅读全文

posted @ 2018-01-06 22:09 夜的第八章 阅读(2057) 评论(0) 推荐(0) 编辑

数字翻转

摘要: 题目描述 对于一个整数X,定义操作rev(X)为将X按数位翻转过来,并且去除掉前导0。例如:如果 X = 123,则rev(X) = 321;如果 X = 100,则rev(X) = 1.现在给出整数x和y,要求rev(rev(x) + rev(y))为多少? 输入描述: 输入为一行,x、y(1 ≤ 阅读全文

posted @ 2018-01-06 22:07 夜的第八章 阅读(282) 评论(0) 推荐(0) 编辑

春招秋招准备

摘要: 参考: 作者:小新没有蜡笔~链接:https://www.nowcoder.com/discuss/61438?type=0&order=0&pos=9&page=0来源:牛客网 1、看集合框架的底层实现原理。2、数据结构与算法分析。3、深入理解Java虚拟机。4、effective Java 。5 阅读全文

posted @ 2018-01-06 16:36 夜的第八章 阅读(179) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted List II

摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2 阅读全文

posted @ 2018-01-06 15:57 夜的第八章 阅读(133) 评论(0) 推荐(0) 编辑

partition List(划分链表)

摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文

posted @ 2018-01-06 14:50 夜的第八章 阅读(336) 评论(0) 推荐(0) 编辑

search in rotated sorted array II

摘要: Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose an arra 阅读全文

posted @ 2018-01-06 14:20 夜的第八章 阅读(174) 评论(0) 推荐(0) 编辑

search a 2D matrix(在二维数组中搜索一个元素)

摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文

posted @ 2018-01-06 10:55 夜的第八章 阅读(150) 评论(0) 推荐(0) 编辑

rotate list

摘要: Given a list, rotate the list to the right by k places, where k is non-negative. Example: 题目是要求从后往前的第k个节点旋转。这里的4.我们要做的就是:1、将一个指针移到最后节点。2、将另一个指针移到旋转点的前 阅读全文

posted @ 2018-01-06 10:14 夜的第八章 阅读(116) 评论(0) 推荐(0) 编辑

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 30 下一页

导航