2015年1月16日

Maximum Gap

摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ... 阅读全文

posted @ 2015-01-16 16:40 Step-BY-Step 阅读(245) 评论(0) 推荐(0) 编辑

Min Stack

摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文

posted @ 2015-01-16 16:06 Step-BY-Step 阅读(118) 评论(0) 推荐(0) 编辑

Excel Sheet Column Number

摘要: Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ... 阅读全文

posted @ 2015-01-16 15:10 Step-BY-Step 阅读(169) 评论(0) 推荐(0) 编辑

Excel Sheet Column Title

摘要: Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 ->... 阅读全文

posted @ 2015-01-16 15:06 Step-BY-Step 阅读(143) 评论(0) 推荐(0) 编辑

Factorial Trailing Zeroes

摘要: Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.最初想法是计算里面能被5整除的数字的个数(因为能被2整除的... 阅读全文

posted @ 2015-01-16 15:04 Step-BY-Step 阅读(121) 评论(0) 推荐(0) 编辑

导航