qingcheng奕 |
|
||
2014年1月11日
摘要:
http://oj.leetcode.com/problems/search-for-a-range/要求复杂度为O(lgn),用二分查找的思想。#include #include using namespace std;class Solution {public: void fun(int* A,int start,int end,int target,vector &ans) { if(start>end || ( start == end && A[start]!= target )) { ans.push_back(-1)... 阅读全文
摘要:
#include using namespace std;class Reader{public: Reader() { xCoordinate = NULL; xCoordinate = (int*)malloc(sizeof(int)*100); coutDoHandle(); delete p3Converter; //不调用Reader2的构造和析构 Converter *p3Converter = new Converter(); delete p3Converter; return 0;} 阅读全文
|
Copyright © 2024 qingcheng奕
Powered by .NET 8.0 on Kubernetes |