Technical University of Manabí Faculty of Informatics Science Engineering Degree in Computer Systems Data Structure

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

TECHNICAL UNIVERSITY OF MANAB FACULTY OF INFORMATICS SCIENCE ENGINEERING DEGREE IN COMPUTER SYSTEMS DATA STRUCTURE TASK # 8.

SPECIAL TYPES OF SIMPLE LISTS (BATTERIES AND QUEUES)

AUTHOR:
PAREDES BRAVO JONATHAN ANDRES

PROFESSOR:
MR. CHRISTIAN TORRES.

LEVEL:
SECOND "C"

PERIOD:
SEPTEMBER 2012 - FEBRUARY 2013

FACULTAD DE CIENCIAS INFORMTICAS

Mission:
Be a unit with high academic prestige, efficiency, transparency and quality in education, organized in their activities, protagonists of regional and national progress.

Vision:
Form efficient professionals and innovators in the field of computer science, giving answers to the needs of society with honesty, fairness and solidarity, raising their standard of living.

TECHNICAL UNIVERSITY OF MANAB

Mission:
Train academics, scientists and responsible professionals, humanist, ethical and supportive, committed to the objectives of national development, which will contribute to the solution of the problems of the country as university teaching with research, able to generate and apply new knowledge, fostering the promotion and dissemination of knowledge and cultures, provided for in the Constitution of the Republic of Ecuador.

Vision:
Be referent, leader and university institution of higher education in Ecuador, by promoting the creation, development, transmission and dissemination of science, technique and culture, social recognition and projection, regionally and globally.

Insert an item in the last position of a list


This is another special case. For this case we will depart from a non-empty list:

Insert at the end

The process is in this case not overly complicated: 1. Need a pointer to point to the last element of the list. The way to achieve this is started by the first and advance until the node that has the value NULL. as following 2. Make node - > next is NULL. 3. Make that you last - > next is node.

Inserted at the end

Insert an item below one any node in a list


Can we again consider the previous case as a particular case of this. Now the "previous" node is one after which to insert the new node:

Insert inside

We assume that we already have the new node to insert, pointed to by node, and a pointer to the node after you insert it. The process to be followed will be: 1. Make node - > next point to previous - > next.

2. Making previous - > following point to node.

Inserted inside

You might also like