www

导航

上一页 1 ··· 4 5 6 7 8 9 下一页

2017年12月31日 #

linux 解压rar

摘要: unrar x chars74.rar 阅读全文

posted @ 2017-12-31 13:13 www_practice 阅读(120) 评论(0) 推荐(0) 编辑

2017年12月24日 #

Linux中ctrl+z,ctrl+d和ctrl+c的区别

摘要: Ctrl-c Kill foreground processCtrl-z Suspend foreground processCtrl-d Terminate input, or exit shell 阅读全文

posted @ 2017-12-24 21:54 www_practice 阅读(183) 评论(0) 推荐(0) 编辑

2017年9月22日 #

Minimum Size Subarray Sum

摘要: public int minSubArrayLen(int[] nums, int s) { if(nums==null||nums.length==0) return 0; int i=0,j=0; int sum=0, int ret=Integer.MAX_VALUE; while(j=s){ ret=Math.min(ret,j-i... 阅读全文

posted @ 2017-09-22 20:38 www_practice 阅读(118) 评论(0) 推荐(0) 编辑

和为S的两个数

摘要: pair FindNumbersWithSum(vector input, int sum) { pair result; int len=input.size(); if(len<2) return result; sort(input.begin(), input.end()); ... 阅读全文

posted @ 2017-09-22 19:28 www_practice 阅读(137) 评论(0) 推荐(0) 编辑

二叉树的后序遍历序列

摘要: bool helper(vector &input, int start, int end) { if(start>=end) return true; int mark=input[end]; int pos=-1; for(int i=start; imark) {... 阅读全文

posted @ 2017-09-22 19:21 www_practice 阅读(241) 评论(0) 推荐(0) 编辑

从上往下遍历二叉树

摘要: vector TravelFromTopToBottom(TreeNode* root) { vector result; if(root==nullptr) return result; queue MyQueue; MyQueue.push(root); while(!M... 阅读全文

posted @ 2017-09-22 17:13 www_practice 阅读(264) 评论(0) 推荐(0) 编辑

树的子结构

摘要: bool helper(TreeNode *root1, TreeNode *root2) { if(root2==nullptr) return true; if(root1==nullptr) return false; if(root1->val==root2->val) ... 阅读全文

posted @ 2017-09-22 16:38 www_practice 阅读(153) 评论(0) 推荐(0) 编辑

合并两个排序链表

摘要: ListNode* Merge(ListNode* p1, ListNode* p2) { if(p1==nullptr) return p2; if(p2==nullptr) return p1; int val1=p1->val; int val2=p2->val; ... 阅读全文

posted @ 2017-09-22 15:50 www_practice 阅读(138) 评论(0) 推荐(0) 编辑

两个栈实现队列

摘要: class MyQueue { public: void push(int key) { stack1.push(key); } int pop() { if(stack2.empty()) { while(!stack1.empty()) { ... 阅读全文

posted @ 2017-09-22 11:12 www_practice 阅读(94) 评论(0) 推荐(0) 编辑

旋转数组中的最小数字

摘要: int minNumberInRotateArray(vector input) { int len=input.size(); if(len==0) return 0; int left=0, right=len-1; int result=INT_MAX; while(left... 阅读全文

posted @ 2017-09-22 10:56 www_practice 阅读(114) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 下一页