摘要: 这篇博文讲的很清楚:https://argcv.com/articles/1036.c 机器学习(ML),自然语言处理(NLP),信息检索(IR)等领域,评估(Evaluation)是一个必要的工作,而其评价指标往往有如下几点:准确率(Accuracy),精确率(Precision),召回率(Rec 阅读全文
posted @ 2017-02-13 14:44 BinWone 阅读(417) 评论(0) 推荐(0) 编辑
摘要: "148. Sort List" Sort a linked list in O(n log n) time using constant space complexity. Solution 利用归并排序的思想 Definition for singly linked list. class Li 阅读全文
posted @ 2017-01-17 22:15 BinWone 阅读(109) 评论(0) 推荐(0) 编辑
摘要: "160. Intersection of Two Linked Lists" Write a program to find the node at which the intersection of two singly linked lists begins. For example, the 阅读全文
posted @ 2017-01-03 21:47 BinWone 阅读(135) 评论(0) 推荐(0) 编辑
摘要: "328. Odd Even Linked List" Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about 阅读全文
posted @ 2017-01-03 17:17 BinWone 阅读(118) 评论(0) 推荐(0) 编辑
摘要: "234. Palindrome Linked List" Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? 判断一 阅读全文
posted @ 2017-01-03 12:00 BinWone 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Trie树:字典查找树。 "208. Implement Trie (Prefix Tree)" Implement a trie with , , and methods. Note: You may assume that all inputs are consist of lowercase 阅读全文
posted @ 2016-12-28 20:39 BinWone 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目:n个数字(0,1,…,n 1)形成一个圆圈,从数字0开始,每次从这个圆圈中删除第m个数字(第一个为当前数字本身,第二个为当前数字的下一个数字)。当一个数字删除后,从被删除数字的下一个继续删除第m个数字。求出在这个圆圈中剩下的最后一个数字。 Solution 阅读全文
posted @ 2016-12-15 12:05 BinWone 阅读(182) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/kth largest element in an array/ Find the kth largest element in an unsorted array. Note that it is the kth largest elem 阅读全文
posted @ 2016-12-09 15:24 BinWone 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 剑指Offer:面试题43 把n个骰子扔在地上,所有骰子朝上一面的点数之和为s。求s的所有可能值出现的次数。 比如扔两个骰子,s的可能值为2 12,出现的次数分别为:1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1 Solution 在一次循环中,一个数组中的第n个元素表示骰子和为n出 阅读全文
posted @ 2016-12-05 13:47 BinWone 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 图 1.DFS & BFS 深度优先算法 : (1)访问初始顶点v并标记顶点v已访问。 (2)查找顶点v的第一个邻接顶点w。 (3)若顶点v的邻接顶点w存在,则继续执行;否则回溯到v,再找v的另外一个未访问过的邻接点。 (4)若顶点w尚未被访问,则访问顶点w并标记顶点w为已访问。 (5)继续查找顶点 阅读全文
posted @ 2016-12-02 20:11 BinWone 阅读(166) 评论(0) 推荐(0) 编辑