![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
面试题
复兴之矢
图像处理与模式识别
深度学习
云计算
展开
-
july:微软等公司数据结构+算法面试100题(第1-100题)首次完整亮相
本文转载自:http://blog.csdn.net/v_july_v/article/details/6057286微软等公司数据结构+算法面试100题(第1-100题)首次完整亮相 作者:July、2010年12月6日。更新:现今,这100题的答案已经全部整理出来了,微软面转载 2017-02-20 20:58:31 · 2484 阅读 · 0 评论 -
【leetcode】 merge two sorted list
问题:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.分析:注意 p==nullptr 和 !p的不同;代原创 2017-03-07 14:56:57 · 374 阅读 · 0 评论 -
【leetcode】Binary Tree Inorder Traversal
问题:Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree [1,null,2,3], 1 \ 2 / 3return [1,3,2].分析:原创 2017-03-07 10:20:42 · 361 阅读 · 0 评论 -
【leetcode】 pow(x,n)
问题:Implement pow(x, n).分析:1、二分法:x^n = x^n/2 * x^n/2 ×*x^n%2。代码:class Solution {public: double myPow(double x,int n){ //指数为负的情况: 倒数; if原创 2017-03-09 20:44:36 · 701 阅读 · 0 评论 -
【leetcode】sqrt
问题:Implement int sqrt(int x).Compute and return the square root of x.分析:1、二分法。代码:class solution{public: int sqrt(int x){ if(x原创 2017-03-09 20:16:51 · 719 阅读 · 0 评论 -
【leetcode】unique paths
【leetcode】 unique paths 动规解法原创 2017-03-09 10:18:46 · 521 阅读 · 0 评论 -
【leetcode】Longest Valid Parentheses
问题:Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is原创 2017-03-05 17:15:59 · 479 阅读 · 1 评论 -
【leetcode】 word ladder
问题:Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence frombeginWord to endWord, such that:Only one let原创 2017-03-08 16:13:11 · 397 阅读 · 0 评论 -
【LeetCode】 Add Two Numbers
题目:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as原创 2017-03-04 15:21:38 · 552 阅读 · 0 评论 -
【leetcode】Implement strStr()
题目:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.分析:看字符串needle是否是haystack的一部分。用暴力破解法。代码:原创 2017-03-05 10:29:02 · 443 阅读 · 0 评论 -
【leetcode】 subset I、II
【subset I】问题:Given a set of distinct integers, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example,If nums = [1,2,3], a原创 2017-03-08 10:40:04 · 427 阅读 · 0 评论 -
【leetcode】search insert position
问题:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplica原创 2017-03-07 19:16:07 · 341 阅读 · 0 评论