![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 61
zslllj
不急躁,固基础,筑大厦。
展开
-
sicily 1020 大数求模
#include #include using namespace std; int main() { int t,n,i,j,k,y; int x[100]={0}; char s[400]; cin>>t; while(t--)//此处注意简洁的写法 { cin>>n;原创 2013-12-14 16:58:18 · 843 阅读 · 0 评论 -
【leetcode】Remove Duplicates from Sorted Array 1和2
Given input array A = [1,1,2], Your function should return length = 2, and A is now [1,2]. 还是原创 2014-09-05 16:56:39 · 416 阅读 · 0 评论 -
Remove Duplicates from Sorted List II
class ListNode { int val; ListNode next; ListNode(int x) { val = x; next = null; } } class Solution { ListNode deleteDuplicates(ListNode head) { if (head=原创 2014-09-07 13:29:43 · 510 阅读 · 0 评论 -
快速排序
快速排序是C.R.A.Hoare于1962年提出的一种划分交换排序。它采用了一种分治的策略,通常称其为分治法(Divide-and-ConquerMethod)。 该方法的基本思想是: 1.先从数列中取出一个数作为基准数。 2.分区过程,将比这个数大的数全放到它的右边,小于或等于它的数全放到它的左边。Partition函数 3.再对左右区间重复第二步,直到各区间只有一个数。原创 2014-10-06 09:46:23 · 389 阅读 · 0 评论 -
【leetcode】Remove Element
双指针的问题,在数组中删除某些元素的时候,由于空间是有多余的,所以无需另外shez原创 2014-09-05 16:14:16 · 370 阅读 · 0 评论