摘要:
将数组的索引和他的内容交换一下 例如 a[4] = {3,2,0,1},交换完成之后就是 a[4] = {2,3,1,0}; 代码如下: c++ void swapArr(vector & a, int currIndex, int count){ int tmp = a[currIndex]; / 阅读全文
摘要:
Validate if a given string is numeric. Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => true 基本上是leetCode上通过率最低的一道了,自己写了很 阅读全文
摘要:
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文