Hdr7 mining
Publish: 2021-05-03 07:31:58
1. How long has it been since you went to the post money card market
it's been two years since the post money card market moved to the electromechanical building, and your news is really blocked
the current address of the postcard market is on the third floor of the electromechanical building, and there is no rest on Saturdays and Sundays
the mechanical and electrical building is located next to the station of "Shenyang station" on the ring road. There are 232 former terminal station, 216 "Shenyang station north" station and so on nearby. The specific position is the back of Fengtai
you can see the electromechanical building on Taiyuan street, Shenyang station and Zhonghua Road. It's very high, and the word "electromechanical" is written on the top of the building. Even if you can't find it, ask about the people nearby. Everyone knows you.
it's been two years since the post money card market moved to the electromechanical building, and your news is really blocked
the current address of the postcard market is on the third floor of the electromechanical building, and there is no rest on Saturdays and Sundays
the mechanical and electrical building is located next to the station of "Shenyang station" on the ring road. There are 232 former terminal station, 216 "Shenyang station north" station and so on nearby. The specific position is the back of Fengtai
you can see the electromechanical building on Taiyuan street, Shenyang station and Zhonghua Road. It's very high, and the word "electromechanical" is written on the top of the building. Even if you can't find it, ask about the people nearby. Everyone knows you.
2. We should make a detailed comparison before investing. After research, only cloud currency is the first e-currency in the world to obtain the e-currency issuance license issued by the European Union!
3. For example, linked list has the advantage of fast deletion, but it is slow in addition. It is easy to see the speed difference in the reading and writing of more than 10W data of ordinary ArrayList, linklist. ArrayList is an ordinary array, which needs to be shifted when it is deleted. When the order of magnitude is large, the speed is very slow. LinkedList in Java implementation should be an analog linked list structure. It increases a lot of operations when adding operations, but it does not need to shift when deleting. It only needs to re label the address, so it is faster to delete
as an example, there are many linked list based collections. Java provides many convenient APIs. In fact, the data structure is the same, no matter which language is used.
as an example, there are many linked list based collections. Java provides many convenient APIs. In fact, the data structure is the same, no matter which language is used.
4. List< T> list = new LinkedList< T>() This set stores data in a linked list structure
5. Well, LinkedList implements the list interface. In addition to all the methods in the list, there are also methods such as get, remove, insert, the beginning element and the end element. These methods enable LinkedList to be used as stack, queue and double end queue (deque). So how do you use it, what is it
6. In C,
is a structure,
in Java,
is a class that changes a pointer into an instance of a class
is a structure,
in Java,
is a class that changes a pointer into an instance of a class
7. class Node {
Object data; < br />Node next;// The object of declaring class node is called next
public node (object data) {/ / the constructor of class node
SetData (data)< br />}
public void setData(Object data) {
this.data = data; < br />}
public Object getData() {
return data; < br />}
}
class Link {
Node head;// Declare an object head of a node class
int size = 0< br />
public void add(Object data) {
Node n = new Node(data); // Calling the constructor of node class
linked list is an important data structure, which plays an important role in program design. C language and C + + language
use pointer to realize linked list structure. Because Java language does not provide pointer, some people think that linked list can not be realized in
java language. In fact, Java language is easier to realize linked list structure than C and C + +
. The object reference in Java language is actually a pointer (the pointers in this paper are in the conceptual sense,
rather than the data type provided by the language), so we can write such a class to implement the nodes in the linked list< br />
class Node
{
Object data;< br /> Node next;// Point to the next node
}
define the data field as the object class because the object class is a generalized superclass, and any class object can assign values to
it, which increases the generality of the code. In order to make the linked list accessible, it is necessary to define a header. The
header of the table must contain a pointer to the first node and a pointer to the current node. In order to add nodes at the end of the list, a pointer to the end of the list can be added. In addition, a field can be used to represent the size of the list. When the caller wants to get the size of the list, he does not have to traverse the whole list. The following figure is the schematic diagram of this kind of linked list:
data structure of linked list
we can use class list to realize linked list structure, and use variables head, tail, length and pointer
to realize header. There are some skills in storing the pointer of the current node. Pointer does not store the pointer to the current
node, but the pointer to its predecessor node. When its value is null, it means that the current node is the first node. So why? This is because after deleting the current node, it is still necessary to ensure that the remaining
nodes form a linked list. If the pointer points to the current node, it will bring great difficulties to the operation. For example,
how to get the current node, we define a method cursor (), and the return value is the pointer to the current node. The class list also defines some methods to implement the basic operations on the linked list. By using these basic operations
we can perform various operations on the linked list. For example, the reset () method makes the first node the current node
the insert (object d) method inserts a node before the current node and makes it the current node
the remove() method deletes the current node and returns its contents, and makes its successor become the current node. For example,
if the last node is deleted, the first node becomes the current node
the source code of list class is as follows:
Import Java. Io. *
public class list
{
/ * uses variable to realize header * /
private node head = null< br /> private Node Tail=null;< br /> private Node Pointer=null;< br /> private int Length=0;
public void deleteall()
/ * clear the whole linked list * /
{
head = null< br /> Tail=null;< br /> Pointer=null;< br /> Length=0;
}
public void reset()
/ * reset the linked list to make the first node the current node * /
{
pointer = null
}
public Boolean isempty()
/ * judge whether the linked list is empty * /
{
return (length = = 0)
}
public Boolean isend()
/ * judge whether the current node is the last * /
{
if (length = = 0)
throw new Java. Lang. nullpointerexception()< br /> else if(Length==1)
return true;< br /> else
return(cursor()==Tail);
}
public object nextnode()
/ * returns the value of the next node of the current node and makes it the current node * /
{
if (length = = 1)
throw new Java. Util. Nosuchelementexception()< br /> else if(Length==0)
throw new java.lang.NullPointerException();< br /> else
{
Node temp=cursor();< br /> Pointer=temp;< br /> if(temp!= Tail)
return(temp.next.data);< br /> else
throw new java.util.NoSuchElementException();
}
}
public object currentnode()
/ * returns the value of the current node * /
{
node temp = cursor()< br /> return temp.data;
}
public void insert (object d)
/ * insert a node before the current node and make it the current node * /
{
node e = new node (d)< br /> if(Length==0)
{
Tail=e;< br /> Head=e;< br /> }
else
{
Node temp=cursor();< br /> e.next=temp;< br /> if(Pointer==null)
Head=e;< br /> else
Pointer.next=e;< br /> }
Length++;
}
public int size()
/ * returns the size of the linked list * /
{
return (length)
}
public object remove()
/ * moves the current node out of the linked list, and the next node becomes the current node. If the removed node is the last
node, the first node becomes the current node * /
{
object temp< br /> if(Length==0)
throw new java.util.NoSuchElementException();< br /> else if(Length==1)
{
temp=Head.data;< br /> deleteAll();< br /> }
else
{
Node cur=cursor();< br /> temp=cur.data;< br /> if(cur==Head)
Head=cur.next;< br /> else if(cur==Tail)
{
Pointer.next=null;< br /> Tail=Pointer;< br /> reset();< br /> }
else
Pointer.next=cur.next;< br /> Length--;< br /> }
return temp;
}
private node cursor()
/ * returns the pointer of the current node * /
{
if (head = = null)
throw new Java. Lang. nullpointerexception()< br /> else if(Pointer==null)
return Head;< br /> else
return Pointer.next;
}
simple application examples of public static void main (string [] args)
/ * linked list * /
{
list a = new list()< br /> for(int i=1; i<= 10; i++)
a.insert(new Integer(i));< br /> System.out.println(a.currentNode());< br /> while(! a.isEnd())
System.out.println(a.nextNode());< br /> a.reset();< br /> while(! a.isEnd())
{
a.remove();< br /> }
a.remove();< br /> a.reset();< br /> if(a.isEmpty())
System.out.println(" There is no Node in List \ n");< br /> System.in.println(" You can press return to quit\ n");< br /> try
{
System.in.read();
/ / make sure that the user can see the running result of the program clearly
}
catch (IOException E)
{}
}
}
}
class node
/ * the node definition of the linked list * /
{
object data< br /> Node next;< br /> Node(Object d)
{
data=d;< br /> next=null;
}
}
readers can also define new methods to operate linked lists according to actual needs. Bidirectional linked list can be implemented in a similar way
except that the node class adds a pointer to the forward node
can be implemented with such code:
class node
{
object data< br /> Node next;< br /> Node previous;< br /> Node(Object d)
{
data=d;< br /> next=null;< br /> previous=null;
}
}
of course, the realization of basic operation of bidirectional linked list is slightly different. The implementation method of linked list and bidirectional linked list can also be used in the implementation of stack and queue. There is no need to write more here. Interested readers can slightly change the code of list class
.
Object data; < br />Node next;// The object of declaring class node is called next
public node (object data) {/ / the constructor of class node
SetData (data)< br />}
public void setData(Object data) {
this.data = data; < br />}
public Object getData() {
return data; < br />}
}
class Link {
Node head;// Declare an object head of a node class
int size = 0< br />
public void add(Object data) {
Node n = new Node(data); // Calling the constructor of node class
linked list is an important data structure, which plays an important role in program design. C language and C + + language
use pointer to realize linked list structure. Because Java language does not provide pointer, some people think that linked list can not be realized in
java language. In fact, Java language is easier to realize linked list structure than C and C + +
. The object reference in Java language is actually a pointer (the pointers in this paper are in the conceptual sense,
rather than the data type provided by the language), so we can write such a class to implement the nodes in the linked list< br />
class Node
{
Object data;< br /> Node next;// Point to the next node
}
define the data field as the object class because the object class is a generalized superclass, and any class object can assign values to
it, which increases the generality of the code. In order to make the linked list accessible, it is necessary to define a header. The
header of the table must contain a pointer to the first node and a pointer to the current node. In order to add nodes at the end of the list, a pointer to the end of the list can be added. In addition, a field can be used to represent the size of the list. When the caller wants to get the size of the list, he does not have to traverse the whole list. The following figure is the schematic diagram of this kind of linked list:
data structure of linked list
we can use class list to realize linked list structure, and use variables head, tail, length and pointer
to realize header. There are some skills in storing the pointer of the current node. Pointer does not store the pointer to the current
node, but the pointer to its predecessor node. When its value is null, it means that the current node is the first node. So why? This is because after deleting the current node, it is still necessary to ensure that the remaining
nodes form a linked list. If the pointer points to the current node, it will bring great difficulties to the operation. For example,
how to get the current node, we define a method cursor (), and the return value is the pointer to the current node. The class list also defines some methods to implement the basic operations on the linked list. By using these basic operations
we can perform various operations on the linked list. For example, the reset () method makes the first node the current node
the insert (object d) method inserts a node before the current node and makes it the current node
the remove() method deletes the current node and returns its contents, and makes its successor become the current node. For example,
if the last node is deleted, the first node becomes the current node
the source code of list class is as follows:
Import Java. Io. *
public class list
{
/ * uses variable to realize header * /
private node head = null< br /> private Node Tail=null;< br /> private Node Pointer=null;< br /> private int Length=0;
public void deleteall()
/ * clear the whole linked list * /
{
head = null< br /> Tail=null;< br /> Pointer=null;< br /> Length=0;
}
public void reset()
/ * reset the linked list to make the first node the current node * /
{
pointer = null
}
public Boolean isempty()
/ * judge whether the linked list is empty * /
{
return (length = = 0)
}
public Boolean isend()
/ * judge whether the current node is the last * /
{
if (length = = 0)
throw new Java. Lang. nullpointerexception()< br /> else if(Length==1)
return true;< br /> else
return(cursor()==Tail);
}
public object nextnode()
/ * returns the value of the next node of the current node and makes it the current node * /
{
if (length = = 1)
throw new Java. Util. Nosuchelementexception()< br /> else if(Length==0)
throw new java.lang.NullPointerException();< br /> else
{
Node temp=cursor();< br /> Pointer=temp;< br /> if(temp!= Tail)
return(temp.next.data);< br /> else
throw new java.util.NoSuchElementException();
}
}
public object currentnode()
/ * returns the value of the current node * /
{
node temp = cursor()< br /> return temp.data;
}
public void insert (object d)
/ * insert a node before the current node and make it the current node * /
{
node e = new node (d)< br /> if(Length==0)
{
Tail=e;< br /> Head=e;< br /> }
else
{
Node temp=cursor();< br /> e.next=temp;< br /> if(Pointer==null)
Head=e;< br /> else
Pointer.next=e;< br /> }
Length++;
}
public int size()
/ * returns the size of the linked list * /
{
return (length)
}
public object remove()
/ * moves the current node out of the linked list, and the next node becomes the current node. If the removed node is the last
node, the first node becomes the current node * /
{
object temp< br /> if(Length==0)
throw new java.util.NoSuchElementException();< br /> else if(Length==1)
{
temp=Head.data;< br /> deleteAll();< br /> }
else
{
Node cur=cursor();< br /> temp=cur.data;< br /> if(cur==Head)
Head=cur.next;< br /> else if(cur==Tail)
{
Pointer.next=null;< br /> Tail=Pointer;< br /> reset();< br /> }
else
Pointer.next=cur.next;< br /> Length--;< br /> }
return temp;
}
private node cursor()
/ * returns the pointer of the current node * /
{
if (head = = null)
throw new Java. Lang. nullpointerexception()< br /> else if(Pointer==null)
return Head;< br /> else
return Pointer.next;
}
simple application examples of public static void main (string [] args)
/ * linked list * /
{
list a = new list()< br /> for(int i=1; i<= 10; i++)
a.insert(new Integer(i));< br /> System.out.println(a.currentNode());< br /> while(! a.isEnd())
System.out.println(a.nextNode());< br /> a.reset();< br /> while(! a.isEnd())
{
a.remove();< br /> }
a.remove();< br /> a.reset();< br /> if(a.isEmpty())
System.out.println(" There is no Node in List \ n");< br /> System.in.println(" You can press return to quit\ n");< br /> try
{
System.in.read();
/ / make sure that the user can see the running result of the program clearly
}
catch (IOException E)
{}
}
}
}
class node
/ * the node definition of the linked list * /
{
object data< br /> Node next;< br /> Node(Object d)
{
data=d;< br /> next=null;
}
}
readers can also define new methods to operate linked lists according to actual needs. Bidirectional linked list can be implemented in a similar way
except that the node class adds a pointer to the forward node
can be implemented with such code:
class node
{
object data< br /> Node next;< br /> Node previous;< br /> Node(Object d)
{
data=d;< br /> next=null;< br /> previous=null;
}
}
of course, the realization of basic operation of bidirectional linked list is slightly different. The implementation method of linked list and bidirectional linked list can also be used in the implementation of stack and queue. There is no need to write more here. Interested readers can slightly change the code of list class
.
8. The linked list is indeed a data structure. The data structure is a way to store data.
the linked list is similar to the iron chain. One by one, one by one, one by one.
for example,
1, followed by 2, then 3, is continuous. 1, 2, 3 are the nodes of the linked list, It's where the data is stored.
more popular.
campus life in Universities:
classes are like this: 1 class a year, 2 classes a year,... 10 classes a year.
classes are nodes, and the students in the class are data. They are continuously stored. But the memory allocation is not continuous.
have time to look, Data structure is very well written in the book. I'll get to that
the linked list is similar to the iron chain. One by one, one by one, one by one.
for example,
1, followed by 2, then 3, is continuous. 1, 2, 3 are the nodes of the linked list, It's where the data is stored.
more popular.
campus life in Universities:
classes are like this: 1 class a year, 2 classes a year,... 10 classes a year.
classes are nodes, and the students in the class are data. They are continuously stored. But the memory allocation is not continuous.
have time to look, Data structure is very well written in the book. I'll get to that
9. The efficiency of array structure is relatively high when querying data through index, while the efficiency is relatively low for array insertion and deletion. When inserting data in the first position, the rest of the data need to be moved backward in turn. When deleting the first data, all the data need to be moved forward. In this way, a second structure, linked list structure, will be introced
simple linked list: in order to ensure that data insertion and deletion will not affect the movement of other data and ensure linear overhead, the link is introced. Each table is not continuously stored
a linked list is composed of a series of nodes. Each node will have a chain point, which is the next chain, and the next chain will execute the reference of the next node, so when we insert or delete, we need the address of the next chain of the linked list. Each node does not need memory for continuous storage, which will rece the linear overhead of deletion and insertion
linked list structure is mainly divided into two kinds of linked lists, one-way linked list and two-way linked list, that is, one-way linked list has only one next chain, while two-way linked list has next chain and pre chain.
simple linked list: in order to ensure that data insertion and deletion will not affect the movement of other data and ensure linear overhead, the link is introced. Each table is not continuously stored
a linked list is composed of a series of nodes. Each node will have a chain point, which is the next chain, and the next chain will execute the reference of the next node, so when we insert or delete, we need the address of the next chain of the linked list. Each node does not need memory for continuous storage, which will rece the linear overhead of deletion and insertion
linked list structure is mainly divided into two kinds of linked lists, one-way linked list and two-way linked list, that is, one-way linked list has only one next chain, while two-way linked list has next chain and pre chain.
Hot content