NOTE


  • 首页

  • 分类

  • 关于

  • 归档

  • 标签

Climbing Stairs

发表于 2016-08-08   |   分类于 LeetCode , Array , Dynamic Programming

You are climbing a stair case. It takes n steps to reach to the top.

Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

阅读全文 »

Set Matrix Zeroes

发表于 2016-08-07   |   分类于 LeetCode , Array

Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.

阅读全文 »

Container with Most Water

发表于 2016-08-06   |   分类于 LeetCode , Array

Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a container, such that the container contains the most water.

阅读全文 »

Maximum Subarray

发表于 2016-08-05   |   分类于 LeetCode , Array , Dynamic Programming

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.

阅读全文 »

Linked List Cycle

发表于 2016-08-05   |   分类于 LeetCode , Linked List

Given a linked list, determine if it has a cycle in it.

阅读全文 »
1…111213
denglyan

denglyan

めざせポケモンマスター

63 日志
31 分类
26 标签
© 2016 - 2018 denglyan
由 Hexo 强力驱动
主题 - NexT.Mist