摘要:
Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
摘要:
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to 阅读全文
摘要:
Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic time complexity. 思路:有多少个0就是有多少个5. 零的产生就是5 阅读全文
摘要:
You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up:Could you do this in-place? 思路:对角线对称呼唤,Y 阅读全文
摘要:
Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a 阅读全文