自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (2)
  • 收藏
  • 关注

原创 C语言指针

说明:大部分内容参考自Notes on Data Structures and Programming Techniques by James AspnesArrays and functions 阵列与函数国内把array一般称为“数组”,但我个人觉得这个翻译并不准确,因为一个array里面可能是数字,也可能是string或者char。个人觉得台湾的“陈列”更符合array的意思。不过无所谓了,也就是一个名称而已。/* compute the sum of the first n eleme

2020-09-21 16:44:40 114

原创 初识Git和GitHub

说来很惭愧,学了两年多计算机了,都还没认真地使用过git和github。最近刷LeetCode,觉得很有必要掌握好data structure的知识,于是又想把cs61b这门课刷一遍。因为cs61b涉及到使用github,我自己也很想练习使用github,所以还是决定把github设置好。今天主要做了下面两件事:重新创建了cs61b仓库 新建了LeetcodePractice仓库以创建LeetcodePractice仓库为例,说一下自己设置的流程:在GitHub上面新建LeetcodeP

2020-09-08 16:02:21 95

原创 LeetCode - 7. 整数反转

给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转。示例1:输入: 123输出: 321示例 2:输入: -123输出: -321示例 3:输入: 120输出: 21注意:假设我们的环境只能存储得下 32 位的有符号整数,则其数值范围为[−231,231− 1]。请根据这个假设,如果反转后整数溢出那么就返回 0。上面是题目。官方给出的答案确实是挺棒的,逻辑完美,代码简洁。先把官方的代码贴上来吧:class Solution { ...

2020-09-03 15:13:48 118

原创 C语言编程 - insertion sort & shell sort

insertion sort理解比较简单,所以就直接看code:void insertionSort(int a[], int n){ int i, j, key, temp; // 初始时,第一个element是sorted // 引入key,作为一个变动的index for(i = 1; i < n; i++){ key = i; j = key - 1; // 当a[j] > a[key]的时候,就

2020-08-30 01:19:41 252

原创 Core Java - 如何重写equals()方法

5.2.1 The equals method参考链接:https://web.mit.edu/6.005/www/fa15/classes/15-equality/我们先来看 == vs. equals() The == operator compares references. More precisely, it tests referential equality. Two references are == if they point to the same storage.

2020-06-10 05:55:09 623

原创 Core Java - Inheritance: Classes, Superclasses, and Subclasses

5.1.1 Defining SubclassesAll inheritance in Java is public inheritance.The keyword extends indicates that you are making a new class that derives from an existing class.The existing class is called the superclass, base class, or parent class. The n..

2020-06-06 08:53:05 202

原创 Core Java - 4.6 Object Construction

4.6.1 Overloading 重载Overloading occurs if several methods have the same name but different parameters.比较常见的就是一个class有多个constructors。Example:// Java program to demonstrate working of method // overloading in Java. public class Sum { // Overlo..

2020-06-04 21:58:14 161

Introduction to Programming Using Java

写得非常清晰易懂!目前在学习Java,这本书也是老师推荐的。不需要很高的英文水平就能读懂。

2019-02-21

空空如也

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

TA关注的人

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