摘要: 题目描述:Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra spac... 阅读全文
posted @ 2015-04-10 17:25 SevenForever 阅读(132) 评论(0) 推荐(0)
摘要: 题目描述:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:此题目要求为判断一个链表是否有环,这应该说是一个经典的面试题目。只需... 阅读全文
posted @ 2015-04-07 19:19 SevenForever 阅读(123) 评论(0) 推荐(0)
摘要: 谱聚类(Spectral Clustering),将图的思想加入近聚类中,生成的一种聚类方法。 阅读全文
posted @ 2015-04-07 16:35 SevenForever 阅读(144) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2015-03-27 16:18 SevenForever 阅读(2) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2015-03-27 15:52 SevenForever 阅读(6) 评论(1) 推荐(0)
摘要: 题目:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the de... 阅读全文
posted @ 2015-03-25 15:35 SevenForever 阅读(145) 评论(0) 推荐(0)
摘要: 题目描述:mplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not pos... 阅读全文
posted @ 2015-03-24 23:17 SevenForever 阅读(173) 评论(0) 推荐(0)
摘要: 题目描述:Implement pow(x, n).思路:要实现pow函数,当然我们可以递归实现return x*pow(x,n-1). 但是这样存在的问题就是递归的计算中不够优化的问题。更简单的方法是每次二分来实现。这样大大减少了乘法的次数。中间需要注意以下几个问题:1.指数是负数2.溢出的问题cl... 阅读全文
posted @ 2015-03-24 20:09 SevenForever 阅读(134) 评论(0) 推荐(0)
摘要: 提交了格灵深瞳的简历后,收到需要先进行一个简单的技术测试的通知,临时抱佛脚,先刷刷上面几道题:题目要求A zero-indexed array A consisting of N integers is given. Anequilibrium indexof this array is any i... 阅读全文
posted @ 2015-03-24 15:30 SevenForever 阅读(419) 评论(0) 推荐(0)
摘要: 题目描述:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.思路:题目的意思呢,就是寻找一组字符串中,字符串使用相同数量的相... 阅读全文
posted @ 2015-03-23 23:31 SevenForever 阅读(119) 评论(0) 推荐(0)