自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

mm12344的博客

Coding green hand

  • 博客(10)
  • 收藏
  • 关注

原创 【Leetcode Python】#21 Merge Two Llist【存疑】

class Solution: def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode: curr = dummy = ListNode(0) # prev = prehead = ListNode(10086) while l1 and l2: ...

2020-04-10 22:49:27 180

原创 【学习小甲鱼 Python】 #21 Lamda匿名函数 【存疑】

课后习题:3.用filter()函数和lambda表达式快速求出100以内所有3的倍数?答:a = list(filter(lambda x:x%3 == 0,range(1,100)))print(a)b = list(filter(lambda x:not(x%3),range(1,100)))print(b)c = list(filter(lambda x:x if x%3...

2020-04-10 19:12:08 164

原创 【Leetcode Python】 #13 Roman to Integer

Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII. Instead, the number four is written as IV. Because the one is before the five we s...

2020-04-09 11:58:14 102

原创 【Leetcode Python】 #1 TwoSum

1. TwoSumGiven an array of integers, return indices of the two numbers suchthat they add up to a specific target.You may assume that each input would have exactly one solution, andyou may not use...

2020-04-07 01:56:11 105

原创 【C++菜鸟问题】变量作用域

问题描述:The following program prints the information that "13-1 is greater than 15". What is going on and why was no diagnostic produced?#include<stdlib.h>#include<stdio.h>#include<iostr...

2018-03-15 15:52:15 251

转载 【C++菜鸟问题】C++浮点数(float、double)比较、相等判断

浮点数在内存中的存储机制和整型数不同,其有舍入误差,在计算机中用近似表示任意某个实数。具体的说,这个实数由一个整数或定点数(即尾数)乘以某个基数(计算机中通常是2)的整数次幂得到,这种表示方法类似于基数为10的科学记数法。所以浮点数在运算过程中通常伴随着因为无法精确表示而进行的近似或舍入。但是这种设计的好处是可以在固定的长度上存储更大范围的数。1、将字符串转换为float、double过程存在精度...

2018-03-15 15:27:45 14273

转载 【C++菜鸟问题】32/64为数据类型长度+sizeof

一、C1.几条规则(1)char类型一般是8bit,但ANSI C里没有硬性规定其长度,某些嵌入式编译器可能是16bit(2)short和long类型的长度不相同(3)int类型通常同具体机器的物理字长相同(4)short通常是16bits, int通常是16bits or 32bits每种编译器可以根据硬件的不同自由确定,但是short和int必须最少是16bits, 而long类型必须最少是3...

2018-03-15 11:13:44 426

转载 【c++菜鸟学习】数据类型

您可能需要存储各种数据类型(比如字符型、宽字符型、整型、浮点型、双浮点型、布尔型等)的信息,操作系统会根据变量的数据类型,来分配内存和决定在保留内存中存储什么。下表显示了各种变量类型在内存中存储值时需要占用的内存,以及该类型的变量所能存储的最大值和最小值。类型位宽度范围char1个字节-127 到 127 或者 0 到 255unsigned char1 个字节0 到 255signed char...

2018-03-15 10:32:40 102

转载 【c++菜鸟学习】typedef +变量声明

1.typedef type newname;typedef int feet;feet distance; //distance是Int型变量2.创建枚举,需要使用关键字 enum。枚举类型的一般形式为:enum enum-name { list of names } var-list;在这里,enum-name 是枚举类型的名称。名称列表 { list of names } 是用逗号分隔的。例...

2018-03-15 10:15:33 333

原创 【C++菜鸟问题】'display' was not declared in this scope

Why this program has compilation error? How to fix it?#include<iostream>using namespace std;int main(){ char s[] = "hello"; display(s); return 0;}void display(char *s){ cout<&l...

2018-03-15 10:03:44 2860

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除