Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

CSC508 - Data Structure pyq with student made answer

Rating
-
Sold
-
Pages
12
Grade
A
Uploaded on
16-02-2025
Written in
2023/2024

CSC508 - Data Structure pyq with student made answer (3rd year computer science student achive A for this subject)

Institution
Course

Content preview

CONFIDENTIAL 1 CS/FEB 2022/CSC508




UNIVERSITI TEKNOLOGI MARA
FINAL ASSESSMENT



COURSE : DATA STRUCTURES
COURSE CODE : CSC508
EXAMINATION : FEBRUARY 2022
TIME : 3 HOURS



INSTRUCTIONS TO CANDIDATES

1. This question paper consists of five (5) questions.

2. Answer ALL questions in your answer sheet. Start each answer on a new page. Write your
name, id and group on the answer sheet.

3. Please scan and save your answers as pdf file.

4. No discussion and do not share your answers with other students. Any copying of or
plagiarized answers will be awarded 0 mark.

5. Answer ALL questions in English.




DecogOP

DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO
This examination paper consists of 7 printed pages
© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL

, CONFIDENTIAL 2 CS/FEB 2022/CSC508


QUESTION 1 (20 MARKS)

Given the following ADT‟s:

public class ArrayList
{
// declaration of other methods and data

public ArrayList()
// method definition

public void addFirst(Object elem)
// method definition

public Object get(int index)
// method definition

public Object set(int index, Object elem)
// method definition

public Object remove(int index)
// method definition

public int indexOf(Object elem)
// method definition

public int size()
// method definition
}

public class LinkedList
{
// declaration of other methods and data

public void insertAtFront(Object elem)
// method definition

public void insertAtBack(Object elem)
// method definition

public Object getFirst()
// method definition

public Object getLast()
// method definition

public Object removeFirst()
// method definition

public Object removeLast()
// method definition

public Object getNext()
// method definition
}


© Hak Cipta Universiti Teknologi MARA CONFIDENTIAL

Written for

Course

Document information

Uploaded on
February 16, 2025
Number of pages
12
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$5.09
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
farisdanial

Also available in package deal

Get to know the seller

Seller avatar
farisdanial UNIVERSITI TEKNOLOGI MARA
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
8
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions