06 2019 档案
摘要:"题目" c++
阅读全文
摘要:"题目" class Solution { public: char a[10][5]={{'\0'},{'\0'},{'a','b','c'},{'d','e','f'},{'g','h','i'},{'j','k','l'},{'m','n','o'},{'p','q','r','s'},{'t
阅读全文
摘要:"题目" 和之前的一样的思路 O(N^(k 1)) class Solution { public: vector fourSum(vector& nums, int target) { sort(nums.begin(),nums.end()); int length = nums.size();
阅读全文
摘要:"题目" 和上一题一样的思路
阅读全文
摘要:"题目" 这道题目其实和上一题有点相似。 N的三次方是肯定过不了的,N的2次方是解决方案。 可以用HashTable,Dictionary,Map等等, 但是最优的思路是,将数组排序,从两头开始计算两个数的和,最终效率为N的3次方 class Solution { public: map,int m
阅读全文
摘要:"题目" c++ class Solution { public: string longestCommonPrefix(vector& strs) { if(strs.size()==0) return ""; int i=0; string ans=""; while(true) { if(i=
阅读全文
摘要:"题目" c++
阅读全文
摘要:"题目" class Solution { public: int v[7]={1,5,10,50,100,500,1000}; string s[7]={"I","V","X","L","C","D","M"}; string intToRoman(int num) { string ans=""
阅读全文
摘要:"题目" class Solution { public: int s[10005]; int maxArea(vector& height) { int ans=0; int l=0; int r=height.size() 1; while(l
阅读全文
摘要:"题目" 大模拟 c++ class Solution { public: int dp[1005][1005]; bool ans; bool isMatch(string s, string p) { return judge(s,p,0,0); } bool judge(string s,st
阅读全文
摘要:"题目" c++ class Solution { public: int a[100005]; bool isPalindrome(int x) { if(x
阅读全文
摘要:"题目" c++ 多注意注意 class Solution { public: int myAtoi(string str) { int len = str.length(); int tag=0; int tag2=0; char tag3='x'; string num=""; for(int
阅读全文
摘要:前言 在阅读这篇文章: "Announcing Net Core 3 Preview3" 的时候,我看到了这样一个特性: Docker and cgroup memory Limits We concluded that the primary fix is to set a GC heap max
阅读全文
摘要:.net core 于 10月17日发布了 ASP.NET Core 2.2.0 preview3,在这个版本中,我看到了一个很让我惊喜的新特性:HTTP Client Performance Improvements ,而且在Linux上性能提升了60% ! 之前就一直苦于 HttpClient
阅读全文
摘要:"题目" c++ class Solution { public: int reverse(int x) { long long int ans=0; int tag=0; while(x) { long long int y =x%10; x/=10; if(y==0&&tag==0) conti
阅读全文
摘要:"题目" 算模拟题吧 class Solution { public: char a[1000][1000]; int tag[1000][1000]; string convert(string s, int numRows) { if(numRows==0||numRows==1) return
阅读全文