How are we doing? Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 8 years, 6 months ago.
Active 8 years, 6 months ago. Viewed 3k times. Edit: Ah, okay; so this is called serialization. Is the the following correct? Is all of this correct? Reed B. Reed B Reed B 1 1 gold badge 8 8 silver badges 18 18 bronze badges. Add a comment. As you should remember, in programming, especially in Object-Oriented Programming, we aim to model real-world situations. For that, we start from a problem or a certain situation, and then we create the computational model. Sometimes you go to an ATM to withdraw money.
If there are more people there when you arrive, you have to stand in a queue. It is simple, the first one to go in the queue, is the first one to go out of the queue at least that is how it should be if people have social discipline. But there are situations that someone can go to the front of the queue.
You are right. We also have in programming a way to model that. We can use a Priority Queue. In this case, we add elements to the queue according to their priority.
Also, the elements are added at the end of their priority. In other words, if a pregnant woman arrives at the queue, she will be after the last pregnant woman in the queue. There are basic operations that are considered standard with disregard of the programming language the Abstract Data Type ADT is implemented. With these four basic operations, you should be able to use a queue data structure to solve real-life problems.
Verbal Ability. Interview Questions. Company Questions. Artificial Intelligence. Cloud Computing. Data Science. Angular 7. Machine Learning. Data Structures. Operating System. Computer Network. Compiler Design. Computer Organization. Discrete Mathematics.
Ethical Hacking. Computer Graphics. Software Engineering. Web Technology. Cyber Security. C Programming. Control System. Data Mining. Data Warehouse. Javatpoint Services JavaTpoint offers too many high quality services. Data Structure is a way to store and organize data so that it can be used efficiently. What is Data Structure? Types of Data Structures There are two types of data structures: Primitive data structure Non-primitive data structure Primitive Data structure The primitive data structures are primitive data types.
Non-Primitive Data structure The non-primitive data structure is divided into two types: Linear data structure Non-linear data structure Linear Data Structure The arrangement of data in a sequential manner is known as a linear data structure.
Data structures can also be classified as: Static data structure: It is a type of data structure where the size is allocated at the compile time. Therefore, the maximum size is fixed.
0コメント