xixi2


  • 首页

  • 关于

  • 标签

  • 分类

  • 归档

  • 搜索

Validate Stack Sequences(946)

发表于 2019-09-27 | 分类于 leetcode

Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop operations on an initially empty stack.

阅读全文 »

877. Stone Game

发表于 2019-09-27 | 分类于 leetcode

Alex and Lee play a game with piles of stones. There are an even number of piles arranged in a row, and each pile has a positive integer number of stones piles[i].

The objective of the game is to end with the most stones. The total number of stones is odd, so there are no ties.

Alex and Lee take turns, with Alex starting first. Each turn, a player takes the entire pile of stones from either the beginning or the end of the row. This continues until there are no more piles left, at which point the person with the most stones wins.

Assuming Alex and Lee play optimally, return True if and only if Alex wins the game.

阅读全文 »

179. Largest Number

发表于 2019-09-27 | 分类于 leetcode

Given a list of non negative integers, arrange them such that they form the largest number.

阅读全文 »

62. Unique Paths

发表于 2019-09-27 | 分类于 leetcode

A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).

The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked ‘Finish’ in the diagram below).

How many possible unique paths are there?

img
Above is a 7 x 3 grid. How many possible unique paths are there?

Note: m and n will be at most 100.

阅读全文 »

leetcode题目分类总结

发表于 2019-09-27 | 分类于 leetcode

这里将leetcode上刷的题目做一下分类.

阅读全文 »
1…1718
xixi2

xixi2

一去不复返的远方还有无法抵达的过去

175 日志
21 分类
107 标签
© 2019 xixi2
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.4
访问人数 总访问量 次