Home
Jeremy's Blog
Cancel

Advanced Dart

Async and Await The async and await keywords provide a declarative way to define asynchronous functions and use their results. Async Async functions always return a promise. To define an asyn...

Basics of Dart

Classes and Methods Class A class is an abstract blueprint used to create more specific, concrete objects. Object Objects are instances of classes created with specific data. class Person { ...

UML Class Diagram

UML Class Notation A class represents a concept that encapsulates state (attributes) and behavior (operations). Each attribute has a type and each operation has a signature. The class name is t...

Model-View-Controller Pattern

Model-View-Controller (MVC) The Model-View-Controller (MVC) is an architectural pattern that separates an application into three main logical components: the model, the view, and the controller....

Process and Thread

Process A process is an instance of a computer program in execution state along with all the necessary information required for its proper execution, like program counter, CPU registers, its act...

Constructor and Destructor

Constructor A constructor is a member function of a class that has the same name as the class name. It helps to initialize the object of a class. It can either accept the arguments or not. It i...

Object Copying

In object-oriented programming, object copying is creating a copy of an existing object, a unit of data in object-oriented programming. Methods of copying There are different strategies for mak...

Basics of OOP

Object-Oriented Programming Object-Oriented Programming is a programming paradigm that relies on the concept of classes and objects. It is used to structure a software program into simple, reusa...

归并排序 Merge Sort

归并排序简介 根据具体的实现,归并排序包括由上往下和由下往上的两种方式。 由下往上的归并排序 将要排序的数列分成若干个长度为 1 的子数列,再将这些数列两两合并。 得到若干个长度为 2 的有序数列后,再将这些数列两两合并,得到若干个长度为 4 的有序数列。 重复以上操作直到合并成一个数列,就可以得到有序数列了。 由上往下的归并排序 由上往下与由下往上在排序上是反方向的。...

选择排序 Selection Sort

选择排序简介 选择排序的基本思想是,在未排序的数列中找到最小或最大的元素,将其存放在数列的起始位置。 接着,再从剩余未排序的元素中继续寻找最小或最大的元素,逐个放到已排序数列的末尾。 以此类推,直到所有元素均排列完毕。 选择排序实现 下面以数列 {20,40,30,10,60,50} 为例,演示选择排序的过程。 第一趟,i = 0。此时,找到最小值 a[3] = 10...