المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : حل واجب M180 المدرس 0544321455 - 00966544321455 - [email protected]



أسواق
18-07-2013, 11:30 PM
حل واجب M180 المدرس 0544321455 - 00966544321455 - [email protected] (http://www.aswaqcity.com/thread1244744.html)


M180: Data Structure and Algorithms in
Question 1: (30 marks)
Write a complete program which reads 10 numbers from a user and then store them in a linked
list. The program should be able to perform the following functions:
i. Insert new number at the end of the list. [8 marks]
ii. Insert new number at the front of the list. [8 marks]
iii. Remove an item from the list. [8 marks]
iv. Print the of the list. [6 marks]
Question 2: (30 marks)
Q2-A: What is the main difference between linked lists and arrays. Given one example where the
arrays are more useful than linked lists. [10 marks]
Q2-B:
Write a complete program which includes a method (append_lists(list_2, List_1)). The method
should append the of linked list_1 with the of linked list_2. For example, if list_2 is
{5, 6, 7, 8} and list_1 is {9, 10, 11, 12}, then append_lists(list_2, list_1) will change list_2 to {5, 6,
7, 8, 9, 10, 11, 12}. [20 marks]
Question 3: (40 marks)
Q3-A: Write a complete program which sums n numbers using stacks. [30 marks]
Q3-B: Write a method d 'search' which searches an array of integers recursively. The
method has three parameters: an array of integers 'int_arr', the search integer 'num' and an integer
starting array index 'ind'. The method returns the integer array index of 'num' or -1 if the search
integer is not found. [10 marks]





حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]