Corner case】的更多相关文章

A corner case (or pathological case) is a problem or situation that occurs only outside of normal operating parameters—specifically one that manifests itself when multiple environmental variables or conditions are simultaneously at extreme levels, ev…
[方法] 字写大点,先注释框架 链表:指针走就行了,最多是两个同时一起走. 两个链表求交点 //corner case if (headA == null || headB == null) { return null; } //keep the same length int A_len = getLength(headA); int B_len = getLength(headB); while (A_len > B_len) { headA = headA.next; A_len--; }…
[抄题]: Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string.  Return a list of all possible strings we could create. Examples: Input: S = "a1b2" Output: ["a1b2", "a1B2&q…
[抄题]: Given a grid where each entry is only 0 or 1, find the number of corner rectangles. A corner rectangle is 4 distinct 1s on the grid that form an axis-aligned rectangle. Note that only the corners need to have the value 1. Also, all four 1s used…
zookeeper简介 zookeeper是为分布式应用提供分布式协作服务的开源软件.它提供了一组简单的原子操作,分布式应用可以基于这些原子操作来实现更高层次的同步服务,配置维护,组管理和命名.zookeeper的设计使基于它的编程非常容易,若我们熟悉目录树结构的文件系统,也会很容易使用zookeeper的数据模型样式.它运行在java上,有java和c的客户端. 协作服务因难于获取正确而臭名远扬,他们特别易于出错如竞争条件和死锁.zookeeper的动机是减轻分布式应用中从零开始实现协作服务的…
先吐槽一下博客园的MarkDown编辑器,推出的时候还很高兴博客园支持MarkDown了,试用了下发现支持不完善就没用了,这次这篇是在其他编辑器下写的,复制过来后发现..太烂了.怎么着作为一个技术博客社区,对代码的支持应该完善一下吧,`行内代码块`不支持就算了,代码段内还不能有空行,一有空行就识别不了了.而且试着用MarkDown发了篇草稿,右边的侧边栏竟然被挤到屏幕下方了,还影响到了博客布局..不说了..简单修改下标题.代码直接发表. 概述及基本概念 **EventBus**是一个Androi…
Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm? Hint: Expected runtime complexity is in O(log n) and the input is sorted. 这题是之前那道H-Index 求H指数的拓展,输入数组是有序的,让我们在O(log n)的时间内完成计算,看到这个时间复…
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its index. The array may contain multiple peaks, in that case return the index to any one of the peaks is fi…
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = "aab", Return 1 since the palindrome partitioning ["aa"…
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = "aabcc", s2 = "dbbca", When s3 = "aadbbcbcac", return true. When s3 = "aadbbbaccc", return false. 这道求交织相错的字符串和之前…