自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(69)
  • 资源 (3)
  • 收藏
  • 关注

原创 LeetCode 剑指Offer 哈希表 by JavaScript

文章目录哈希表基本概念实战练习总结参考哈希表本文描述了哈希表的基本概念,并给出了几道常见的算法题来帮助读者理解哈希表。基本概念哈希表实际上就是关联数组的抽象。具体来说,就是通过哈希函数将key映射到数组上,并保证每个key在数组中有一个唯一对应的索引。通常,这样会存在冲突问题,当发生位置冲突时,一般会进行重定位或者直接使用链表来解决冲突。实战练习剑指 Offer 03. 数组中重复的数字/** * @param {number[]} nums * @return {number}

2021-03-25 23:10:39 120

原创 LeetCode 剑指Offer 队列和栈 by JavaScript

1

2021-03-23 18:41:36 120

原创 LeetCode 剑指Offer 链表 by JavaScript

文章目录标题问题描述解题思路代码展示算法分析标题问题描述解题思路代码展示算法分析

2021-03-20 01:43:54 117

原创 LeetCode 剑指Offer 10-I by JavaScript

问题描述写一个函数,输入 n ,求斐波那契(Fibonacci)数列的第 n 项(即 F(N))。斐波那契数列的定义如下:F(0) = 0,F(1)= 1F(N) = F(N - 1) + F(N - 2), 其中 N > 1.斐波那契数列由 0 和 1 开始,之后的斐波那契数就是由之前的两数相加而得出。答案需要取模 1e9+7(1000000007),如计算初始结果为:1000000008,请返回 1。示例 1:输入:n = 2输出:1示例 2:输入:n...

2021-03-04 14:28:08 90 1

原创 LeetCode 剑指Offer 06 by JavaScript

问题描述输入一个链表的头节点,从尾到头反过来返回每个节点的值(用数组返回)。示例 1:输入:head = [1,3,2]输出:[2,3,1]限制:0 <= 链表长度 <= 10000解决方案/** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } *//**...

2021-03-04 14:08:38 97 1

原创 LeetCode 剑指Offer 05 by JavaScript

问题描述请实现一个函数,把字符串 s 中的每个空格替换成"%20"。示例 1:输入:s = "We are happy."输出:"We%20are%20happy."限制:0 <= s 的长度 <= 10000解决方案/** * @param {string} s * @return {string} */var replaceSpace = function(s) { return s.replace(/\s/g,"%20");...

2021-03-03 22:22:59 92 1

原创 LeetCode 剑指Offer 03 by JavaScript

1

2021-03-03 12:41:04 72

原创 LeetCode 剑指Offer 04 by JavaScript

问题描述找出数组中重复的数字。在一个长度为 n 的数组 nums 里的所有数字都在 0~n-1 的范围内。数组中某些数字是重复的,但不知道有几个数字重复了,也不知道每个数字重复了几次。请找出数组中任意一个重复的数字。示例 1:输入:[2, 3, 1, 0, 2, 5, 3]输出:2 或 3限制:2 <= n <= 100000解决方案/** * @param {number[]} nums * @return {number} */v...

2021-03-03 12:35:13 75

原创 学习笔记3--------------------Python Data Science Toolbox (Part 2)

第一部分: 学习迭代器,iter,enume,zip等,注意利用*调用迭代器内部对象的时候,调用完成后对象会变空(或许是指针的概念,指向尾巴了,未验证)。第二部分: 首先学习了列表推导式(list comprehension), 如res=[num+1 for num in nums] 即 [结果表达式 for item in iterator]。对于多层循环...

2019-05-08 12:49:29 597

原创 学习笔记2--------------------Python Data Science Toolbox (Part 1)

第一部分: 讲了函数,可变参数,*代表列表(解包返回元组),**代表字典。‘,’逗号解包元组第二部分: 内嵌函数的使用,内嵌函数可以保存外部函数的变量值,且利用返回内置函数名的方式,可以将一个变量转化为内置函数的引用(此时外部函数调用完毕,但是内嵌函数保留了外部函数的相关参数),这实际上也是python万物皆是对象的思想。global全局参数,声明一次,即此方法内使用的...

2019-05-07 22:21:16 246

原创 学习笔记1----------Introduction to Python & Intermediate Python for Data Science

1.Introduction to Python: 这里首先讲了一下python的基础语法,基本数据类型,然后了解了list类型,引用与新建list对象的区别。之后讲了function和method的区别,因为python万物皆对象,实质上可以认为function为全局函数对象,method为类成员对象函数,即method需要'.'来调用,function不需要。最后讲了一下...

2019-05-01 11:27:16 213

原创 学习笔记一 --------回归分析基本概念

回归问题: 单变量线性回归模型:梯度下降法: 现在从单特征--->多特征量:对应的梯度下降算法同时多变量回归模型中,为了使得特征之间的范围规模相差不大(如果相差较大梯度下降算法的效率会降低很多),引入了特征缩放的概念这里还引入了均值归一化的概念,如下:解决回归问题还有一种方法,叫做标准方程法...

2019-03-30 23:29:09 244

原创 A1084

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=100;bool flag[maxn]={false};int isHash(c...

2019-02-06 17:25:59 163

原创 B1029

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=100;bool flag[maxn]={false};int isHash(c...

2019-02-06 17:25:21 196

原创 A1016

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;struct Bill{    char name[22];    char time[20];    cha...

2019-02-02 11:08:25 139

原创 A1095

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;struct Car{    char id[10];    char time[10];    char s...

2019-02-02 11:05:47 378 1

原创 A1080

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;struct Student{    int id;    int ge,gi,sum;    int cho...

2019-02-02 10:47:51 182

原创 A1083

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;struct Student{    char name[15];    char id[15];    in...

2019-02-02 10:08:41 156

原创 A1075

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=10010;struct User{    int id;    int gra...

2019-01-13 13:07:28 214

原创 A1055

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;algorithm&gt;using namespace std;struct People{    char name[10];    int age;    int mon...

2019-01-10 22:31:45 226

原创 A1028

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=100010;struct Student{    char id[8],nam...

2019-01-10 22:03:53 165

原创 A1025

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=30010;struct Student{    char id[15];  ...

2019-01-10 21:54:40 192

原创 A1012

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=2010;int sign=0;char str[]={'A','C','M',...

2019-01-10 13:52:19 177

原创 A1062

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=100010;struct Student{    int id;    in...

2019-01-10 12:31:38 272

原创 B1015

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;algorithm&gt;using namespace std;const int maxn=100010;struct Student{    int id;    in...

2019-01-10 12:31:24 253

原创 A1082

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;char ge[][7]={"ling","yi"

2019-01-10 10:44:41 221

原创 A1077

    #include&lt;iostream&gt;    #include&lt;cstdio&gt;    #include&lt;cstring&gt;    #include&lt;string&gt;    #include&lt;cmath&gt;    #include&lt;cstdlib&gt;    using namespace std;    char ...

2019-01-10 10:44:21 279

原创 A1035

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;const int maxn=1010;struct User{   ...

2019-01-10 10:43:59 165

原创 A1005

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;char str[][8]={"zero","one&quo

2019-01-10 10:43:38 133

原创 A1001

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;int main(){    int a,b;    scanf("...

2019-01-09 16:31:13 186

原创 B1048

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;char value[]={'0','1','2','3','4','5'...

2019-01-09 16:12:53 447

原创 A1073

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;using namespace std;const int maxn=10010;char num[maxn],s[maxn];int main(){    scanf("%s",s);    i...

2019-01-09 15:23:38 193

原创 B1024

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;const int maxn=10010;char s[maxn],st...

2019-01-09 15:20:35 428

原创 A1061

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;char daily[][6]={"MON","TUE&qu

2019-01-09 13:52:43 127

原创 B1014

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;string&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;char daily[][6]={"MON","TUE&qu

2019-01-09 13:51:57 179

原创 B1009

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;int main(){    char s[100];    fgets(s,100,stdin);    in...

2019-01-09 12:54:36 302

原创 B1002

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;const int maxn=1010;char str[maxn];string number[]={"ling"...

2019-01-09 12:28:01 444 1

原创 B1031

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;int weight[]={7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};char M[]...

2019-01-09 11:53:49 176

原创 B1021

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;#include&lt;cstdlib&gt;using namespace std;const int maxn=1010;int table[12]={0};int main(){    ch...

2019-01-09 11:35:40 256

原创 B1006

#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cstring&gt;#include&lt;cmath&gt;using namespace std;const int maxn=1010;int main(){    int n;    scanf("%d",&amp;n);    int b,s,g;...

2019-01-08 13:03:01 153

反转链表C实现

反转链表C实现

2018-06-14

同构树代码C实现

同构树C实现!

2018-06-14

平衡二叉树的C算法实现

一个简单的平衡二叉树的C语言实现的代码一个简单的平衡二叉树的C语言实现的代码一个简单的平衡二叉树的C语言实现的代码一个简单的平衡二叉树的C语言实现的代码一个简单的平衡二叉树的C语言实现的代码一个简单的平衡二叉树的C语言实现的代码

2018-06-14

空空如也

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

TA关注的人

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