Write two programs using your preferred language each to
implement a Linked list and a Queue. The output should look like
the following:
--Enter your course code:
COMP2313
-- Wow! Welcome to data structures.
-- Enter your assignment number:
2
-- Ah! You will enjoy working with Linked
Lists.
-- Let's create a list and use insert and
delete.
-- Enter a number to insert into the list:
1
-- 1
-- Enter another:
3
-- 1 3
-- Enter another:
6
-- 1 3 6
-- delete a number from the tail
-- 1 3
-- delete a number from the head
-- 3
--Enter your course code:
COMP2313
-- Wow! Welcome to data structures.
-- Enter your assignment number:
2
-- Ah! You will enjoy working with Queues.
-- Let's create a list and use enqueue and
dequeue.
-- Enter a number to enqueue to the list:
1
-- 1
-- Enter another:
3
-- 1 3
-- Enter another:
6
-- 1 3 6
-- dequeue a number
-- 3 6
-- dequeue another number
-- 6
Write two programs using your preferred language each to implement a Linked list and a Queue. The output should look lik
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am