Code Time Limit : 2000/1000ms (Java/Other) Memory Limit : 60000/30000K (Java/Other) Total Submission(s) : 11 Accepted Submission(s) : 10 Problem Description Transmitting and memorizing information is a task that requires different coding systems…
Pearls Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other) Total Submission(s) : 22 Accepted Submission(s) : 12 Problem Description In Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces…
合并两个有序数组 开始的时候将这道题理解错了,发现几个奇怪的测试案例后才明白这道题什么意思.本来的想法就是把nums2全部放到num1里面,然后删除重复元素.排序一下,就有了下面的代码: class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { for(int i=0;i<n;i++) { nums1.push_back(nums2[i…