# sizeof

char 1 int、float 4 double 8 指针 4 数组 看大小 char a[2]; cout<<sizeof(a);//2,1*2 int b[2] ; cout<<sizeof(b);//8,4*24.结构体 与精度最高的对齐//sizeof(test)=2 struct test{ char a; char b; };//最高为sizeof(in...

# 把数组排成最小的数

class Solution { public: static bool cmp(int a,int b){ string A=""; string B=""; A+=to_string(a); A+=to_string(b); B+=to_string(b); B+=to_string(a);...

# 扑克牌顺子

class Solution { public: bool IsContinuous( vector numbers ) { if(numbers.size()!=5){ return false; } int d[14]; int maxnum=-1,minnum=14; me...

# 实现pow函数

class Solution { public: double Power(double base, int exponent) { double num = base,res = 1; int exp = exponent; if (exp == 0) return 1; else if (exp <0){ if (base =...

# 回文串（最长前缀/最长子串）

#include "stdafx.h" #include using namespace std; //求最长前缀回文串 int palindromical(string s){ if (s.size() == 0) return 0; int fc = s[0]; int i = 0; int maxlen = 1; wh...

8-15 2017搜狗...

# leetcode 110 .Balanced Binary Tree

Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ...

# 正则表达式匹配

35条 共2页1 2 下一页 尾页
个人资料
• 访问：2801次
• 积分：352
• 等级：
• 排名：千里之外
• 原创：30篇
• 转载：1篇
• 译文：0篇
• 评论：0条
文章存档
评论排行