- 博客(3)
- 资源 (5)
- 收藏
- 关注
原创 合并k个有序数组
题目: 合并k个有序数组。 分析: 利用一个大小为k的小根堆(代码里用multiset表示),每次取堆顶的数字,直到大根堆为空。 struct node { vector>* ptr; int i; int j; node(vector>* p, int a, int b) :ptr(p), i(a), j(b) {} }; struct compare { bool
2015-09-21 14:46:12 2451
原创 leetcode - Move Zeroes
题目: Move Zeroes Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3
2015-09-19 15:44:15 439
原创 leetcode - Integer to English Words
题目: Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1. For example, 123 -> "One Hundred Twenty Three" 12345 -> "Twelve Th
2015-09-05 01:17:08 515
VC++程序: 将字符串转换成公式并计算结果
2014-10-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人