摘要: 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? 阅读全文
posted @ 2017-05-12 22:58 JeffLai 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Given a collection of distinct numbers, return all possible permutations. 阅读全文
posted @ 2017-05-12 22:41 JeffLai 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given a collection of distinct numbers, return all possible permutations. 阅读全文
posted @ 2017-05-12 22:33 JeffLai 阅读(690) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the minimum number of jumps. Note: You can assume that you can always reach the last index. 阅读全文
posted @ 2017-05-12 22:05 JeffLai 阅读(73) 评论(0) 推荐(0) 编辑
摘要: Implement wildcard pattern matching with support for '?' and '*'. 阅读全文
posted @ 2017-05-12 16:24 JeffLai 阅读(247) 评论(0) 推荐(0) 编辑
摘要: Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2. Note: * The length of both num1 and num2 is < 110. * Both num1 and num2 contains only digits 0-9. * Both num1 and num2 does not contain any leading zero. * You must not use any built-in BigInteger library or convert the inputs to integer directly. 阅读全文
posted @ 2017-05-12 15:21 JeffLai 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2017-05-12 14:38 JeffLai 阅读(169) 评论(0) 推荐(0) 编辑