微服务正在博客、社交媒体讨论组和会议演讲中获得越来越多的关注,在Gartner的2014 Hype Cycle上它的排名非常靠前。同时,软件社区中也有不少持怀疑论者,认为微服务不是什么新东西。Naysayers认为这就是SOA架构的...
分类:
其他好文 时间:
2015-06-03 17:53:44
阅读次数:
238
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
基本思路:
快慢两指针。
一个指针每次移动一步,另一个指针每次移动两步。如存在环,必有相遇的时候。
/**
* Definition for singly-li...
分类:
其他好文 时间:
2015-06-02 17:57:11
阅读次数:
89
Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Follow up:
Can you solve it without using extra space?
解题思路:
1、解法1,用se...
分类:
其他好文 时间:
2015-06-02 11:20:46
阅读次数:
100
Linked List Cycle
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
解题思路:
1、最基本的办法是用一个set来存储所有已经出现过的指针。若出现重复,则表示有环,若没有重复,则没有环...
分类:
其他好文 时间:
2015-06-02 00:29:05
阅读次数:
135
感觉又是一道数学题,没想了,直接看的人家是怎么做的。转自:http://www.cnblogs.com/x1957/p/3406448.html比I麻烦点的就是找到循环开始点TATI只是判断是否循环。要求不使用额外空间(不然hash就可以了按I的思路,我们又慢指针S和快指针F。。。F走两步,S走一步...
分类:
其他好文 时间:
2015-05-30 17:58:29
阅读次数:
119
引言前面我们介绍了流水线的写法(http://blog.csdn.net/rill_zhen/article/details/45980039),流水线是数字设计中很常用的一种设计方法,可以提高运行频率,提高吞吐量。如果组合逻辑延迟较大,一个时钟周期完成不了时,除了插入寄存器将组合逻辑拆分成流水线外,还可以采用multi-cycle的方式。multi-cycle的工作机制很简单,从给定输入之后,等...
分类:
其他好文 时间:
2015-05-29 21:48:15
阅读次数:
276
1.题目描述:点击打开链接
2.解题思路:本题是一道模拟题,虽然看上去像数学,但实际上只需要模拟一下这个过程就好了。首先,我们先让h1变为a1,设需要k1步才可以,如果h2经过k1步也变为a2,那么直接输出答案。否则,我们接下来找h1变化的循环节cycle,即每经过一个cycle,就可以再到达a1。那么我们看h2需要几个cycle才可以从当前位置(即第k1步时候的位置)到达a2,假设只需要k2步...
分类:
其他好文 时间:
2015-05-28 21:36:42
阅读次数:
196
关于block在内存中的位置,http://tanqisen.github.io/blog/2013/04/19/gcd-block-cycle-retain/这篇文章解释的不错,但是好像并没有区分arc和mrc的区别block的位置分为这几种NSGlobalBlock:类似函数,位于text段;N...
分类:
其他好文 时间:
2015-05-28 19:48:28
阅读次数:
234
Ititle:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:使用两个指针slow,fast。两个指针都从表头开始走,slow...
分类:
其他好文 时间:
2015-05-24 11:25:59
阅读次数:
148
1 Open-loop solution One potential solution is to assert CDC signals for a period of time that exceedsthe cycle time of the sampling clock as shown .....
分类:
其他好文 时间:
2015-05-21 22:13:54
阅读次数:
157