摘要: Given a string, find the length of the longest substring without repeating characters. Example 1: Input: "abcabcbb" Output: 3 Explanation: The answer 阅读全文
posted @ 2018-09-22 00:26 yuchi328 阅读(102) 评论(0) 推荐(0)
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2018-09-21 23:53 yuchi328 阅读(79) 评论(0) 推荐(0)
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2018-09-21 22:10 yuchi328 阅读(79) 评论(0) 推荐(0)
摘要: 题目描述在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。 解答 注意查找的顺序。 阅读全文
posted @ 2018-09-21 22:01 yuchi328 阅读(109) 评论(0) 推荐(0)
摘要: 面试手写代码,当时只写出了加减乘,还写的漏洞百出。下面是加减法: 阅读全文
posted @ 2018-09-21 21:44 yuchi328 阅读(137) 评论(0) 推荐(0)
摘要: 题目 给出N个物品价格,每件物品最多选一件,是否能恰好组合金额M。能输出1,不能输出0。输入输入 N 输入 N 个价格p输入金额 M输出能组合出来,输出 1,否则输出 0 样例输入699 199 1999 10000 39 149910238样例输出1 解答 深度遍历,对于一个物品每次有两个选择:选 阅读全文
posted @ 2018-09-21 19:30 yuchi328 阅读(252) 评论(0) 推荐(0)
摘要: 面试题:不使用库函数求一个数的立方根。 解法:二分法。 阅读全文
posted @ 2018-09-21 18:58 yuchi328 阅读(1444) 评论(0) 推荐(0)