码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
LeetCode#28 Implement strStr()
Problem Definition:Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.Solutio...
分类:其他好文   时间:2015-07-24 22:07:26    阅读次数:83
LeetCode ---LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if the...
分类:系统相关   时间:2015-07-24 18:31:55    阅读次数:126
LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:系统相关   时间:2015-07-24 17:57:34    阅读次数:180
CheeseZH: Stanford University: Machine Learning Ex5:Regularized Linear Regression and Bias v.s. Variance
源码:https://github.com/cheesezhe/Coursera-Machine-Learning-Exercise/tree/master/ex5Introduction:In this exercise, you will implement regularized linear...
分类:系统相关   时间:2015-07-24 15:40:53    阅读次数:468
POJ 2896 另解暴力
就是简单的用strstr函数对字符串进行处理。另解:暴力(就是用strstr函数对字符串进行处理)另解:暴力(普通的字符串处理 。关键是strstr函数):#include#includestruct Bing{ char name[210]; int num;}bing[510];st...
分类:其他好文   时间:2015-07-23 21:44:48    阅读次数:131
cpu cache中LRU算法所需要的位数
参考:algorithm LRU, how many bits needed for implement this algorithm?问题:在cpu缓存中使用的LRU替换算法需要多少位呢?解决方法: 对于n路相连的缓存来说,LRU每个缓存块需要的位数为log2(n),那么每个set需要的位数就为n*log2(n)。(原文:Assuming you mean a 4-way set-associa...
分类:编程语言   时间:2015-07-23 17:57:11    阅读次数:505
Implement Stack using Queues
Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()...
分类:其他好文   时间:2015-07-23 13:42:34    阅读次数:106
Implement BST
1 import java.util.*; 2 3 //docs about generic version of class: https://docs.oracle.com/javase/tutorial/java/generics/types.html 4 public class...
分类:其他好文   时间:2015-07-23 06:47:27    阅读次数:156
[CareerCup] 2.7 Palindrome Linked List 回文链表
2.7 Implement a function to check if a linked list is a palindrome.LeetCode上的原题,参见我之前的博客Palindrome Linked List 回文链表。
分类:其他好文   时间:2015-07-22 22:22:58    阅读次数:108
leetcode_225题——Implement Stack using Queues (队列,栈)
Implement Stack using QueuesTotal Accepted:9609Total Submissions:31710My SubmissionsQuestionSolutionImplement the following operations of a stack usin...
分类:其他好文   时间:2015-07-22 18:19:15    阅读次数:90
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!