C # (Data Structure): 1. sequence table structure,

Source: Internet
Author: User

C # (Data Structure): 1. sequence table structure,

Our programmers have three major advantages: laziness, laziness, and self-confidence. I am honored to take over all of these three points. But the relationship between Mu and Mu cannot shake my determination to learn. Because there is no end to technology.

 

The dividing line ------------------------------------------------------

A separation line of life.

How many times have I told myself to say goodbye to myself yesterday. Do not take your past away, new fantasies of the eternal future.

Let's talk about the topic. First of all, some data structures are not commonly used after learning, and many friends do not know what they are doing. Today, I will explain in detail the C # sequence table of the data structure.

First, I created a class library project. Creates a class and an interface.

In the IListds interface, we want to write the basic method of the sequence table (of course, the method is unlimited and you can imagine it infinitely ). Here are a few basic examples: Get the length of the array, create an empty array, insert an element at the specified position, delete the element at the specified position, and determine whether the array is empty, whether it is full .... I will not list them one by one.

Several methods I have selected:

 

Since the method has been defined, the rest of the work must be to inherit the interface method in the class, and then interact with each other through the interface when calling.

Predict how to listen to the next decomposition. To be continued

 

  


Symbol in C Language <Yes

Left shift operator (<)

Removes all the binary bits of an operation object from the left and adds 0 to the right ).

For example, a = a <2 shifts the binary bits of a two places to the left and complements 0 to the right,

Move 1 to the left and then a = a * 2;

If the left shift does not include 1 in the Discard high position, then shifts one bit left, which is equivalent to multiplying the number by 2.
Shift right operator (>)

Shifts all the binary bits of a number to several places to the right, and adds 0 to the left of the positive number, 1 to the left of the negative number, and discards the right of the negative number.

The operand shifts one digit to the right, which is equivalent to dividing the number by 2.

For example, a = a> 2 shifts the binary bit of a two places to the right,

0 or 1 to see whether the number is positive or negative.

Symbol in C Language <Yes

Left shift operator (<)

Removes all the binary bits of an operation object from the left and adds 0 to the right ).

For example, a = a <2 shifts the binary bits of a two places to the left and complements 0 to the right,

Move 1 to the left and then a = a * 2;

If the left shift does not include 1 in the Discard high position, then shifts one bit left, which is equivalent to multiplying the number by 2.
Shift right operator (>)

Shifts all the binary bits of a number to several places to the right, and adds 0 to the left of the positive number, 1 to the left of the negative number, and discards the right of the negative number.

The operand shifts one digit to the right, which is equivalent to dividing the number by 2.

For example, a = a> 2 shifts the binary bit of a two places to the right,

0 or 1 to see whether the number is positive or negative.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.