- 博客(2)
- 收藏
- 关注
原创 Leetcode:239. Sliding Window Maximum (c++)
Problem:Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding ...
2018-04-29 09:06:53 278
原创 卡特兰数:2N个人排队买电影票,N个人持5元买票,N个人持10元买票.售票处在售票前只有票没有钱,票价5元 ,问有多少种排队方式 能让2N个人顺利买票,并且输出所有排队队列(不会因为找钱问题)
分析n = 0 时,队列为空,可以认为只有一种;n = 1 时,队列:5 ,10 共有1种;n = 2 时 ,队列: 5, 10,5,10 5,5,10,10 共有两种n = 3时, 队列:5,5,5,10,10,10 5,5,10,5,10,10 5,...
2018-04-12 09:58:56 7253 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人