Welcome! Log In Create A New Profile

Advanced

Using 1st edition

Posted by IanCockcroft 
Announcements Last Post
Announcement myUnisa availability 21 to 24 March 2019 03/17/2019 02:24PM
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Using 1st edition
February 09, 2010 02:10PM
Hi Guys, I have the 1st edition of Malik. I cant afford to get the new one.
My problem is that the assignment questions refered to. Can anyone give me the questions out the book please.
specificly
Do Exercise 8b, Chapter 5, page 346 from Malik.
Do Programming Exercise 4, Chapter 5, page 349 from Malik.

Really apprecited.
Ian
avatar Re: Using 1st edition
February 09, 2010 04:17PM
I'm doing this in S2, but lurking here for purposes of reconnaissance, so let me do something useful while I'm about it.

Q8b.
Show what is produced by the following C++ code. Assume the node is in the usual info-link form with the info of type int. (list and ptr are pointers of type nodeType).
...

b.
list=new nodeType;
list->info=20;
ptr=new nodeType;
ptr->info=28;
ptr->link=NULL;
list->link=ptr;
ptr=new nodeType;
ptr->info=30;
ptr->link=list;
list=ptr;
ptr=new nodeType;
ptr->info=42;
ptr->link=list->link;
list->link=ptr;
ptr=List;
while(ptr!=NULL)
{
cout<<ptr->info << endl;
ptr=ptr->link;
}



That should get you started...
Re: Using 1st edition
February 10, 2010 10:27AM
Thanks a mil Eddie
avatar Re: Using 1st edition
February 11, 2010 03:03AM
No problem. 3 am (having been woken by the lights when our daily power failure ended), so for now I'll leave Ex 4 to someone else.
Re: Using 1st edition
February 22, 2010 12:56PM
Thanks Eddie,

I'm stuck with the same problem of edition 1?

anyone got
Do Programming Exercise 4, Chapter 5, page 349 from Malik. ?

Really appreciate it.
avatar Re: Using 1st edition
February 22, 2010 01:18PM
Greetz Guys

I have a copy of Data Structures using C++ 1st Edition,
My Second Edition has been on order since January,
and it looks like it won't be here in time for the Assignment due date.

Could someone please post the required questions from the second edition

Do Exercise 8b, Chapter 5, page 346 from Malik.
Do Programming Exercise 4, Chapter 5, page 349 from Malik.

Thank you so much.

(if by some miracle my 2nd ed arrives on time, i will post the questions)
avatar Re: Using 1st edition
February 22, 2010 01:29PM
Exercise 8b, Chapter 5, page 346 from Malik SECOND EDITION
seems to be identical to
Exercise 9, Chapter 5, page 360 from Malik FIRST EDITION

and

Programming Exercise 4, Chapter 5, page 349 from Malik SECOND EDITION
seems to be
Programming Exercise 4, Chapter 5, page 363 from Malik FIRST EDITION
as it deals with splitting a linked list into two sublists of (almost) equal size.

can someone confirm this?

Thanks
avatar Re: Using 1st edition
February 22, 2010 02:06PM
4. (Dividing a linked list into two sublists of almost equal sizes)
a.Add the operation divideMid to the class linkedListType as follows:

void divideMid(linkedListType<Type> &sublist);

/* This operation divides the given list into two sublists of (almost) equal sizes.
Postcondition: first points to the first node and last points to the last node of the first sublist.
sublist.first points to the first node and sublist.last points to the last node of the second sublist.

Consider the following statements:

unorderedLinkedList<int> myList;
unorderedLinkedList<int> subList;

Suppose myList points to the list with elements 34 65 27 89 12 (in this order). The statement

myList.divideMid(subList);

divides myList into two sublists: myList points to the list with the elements 34 65 27, and subList points to the sublist with the elements 89 12.

b. Write the definition of the function template to implement the operation divideMid. Also write a program to test your function.

@ ToXic. How many people do you think are going to have both editions? If the lecturers monitor this, I suppose they could give you an answer... OK. So maybe there are people with both. Anyway, there's your other question, as requested. As usual, I give no guarantees of correctness, so don't blame me if it turns out I messed up. In the end it's up to you to do your checking, still. Maybe email or phone the lecturers?

I know in Chemistry they often give references to several editions of the prescribed book, just in case some of the students are making do with old books.
Anonymous User
Re: Using 1st edition
February 22, 2010 09:48PM
The questions are given in the tutorial letter. Just below where it states the page number and exercise, the exercise question is given. It is exactly the same as the textbook.
Re: Using 1st edition
March 09, 2010 11:25AM
umm, which edition of the text book?
avatar Re: Using 1st edition
June 24, 2010 03:06PM
This just pisses me off. Failed this last year (45% but did not do my supp). Now I'm expected to fork out another R1K for a new book.

Will do this for S2 too sad smiley but going to work from my Version1 book.

--------------------------------------------------------------
Don't Assume Everything is a Nail Just Because You Have a Really Big Hammer
avatar Re: Using 1st edition
June 24, 2010 03:07PM
gvs Wrote:
-------------------------------------------------------
> The questions are given in the tutorial letter.
> Just below where it states the page number and
> exercise, the exercise question is given. It is
> exactly the same as the textbook.

Cool - hope they continue to do this for S2.

--------------------------------------------------------------
Don't Assume Everything is a Nail Just Because You Have a Really Big Hammer
avatar Re: Using 1st edition
June 24, 2010 03:33PM
Yep. I've checked. Have the latest greatest Malik, and it matches.

Your book should be fine.
Re: Using 1st edition
July 26, 2010 07:34PM
I have 1st edition. whats new in the 2nd edition?
avatar Re: Using 1st edition
July 26, 2010 09:00PM
What's old in the first?
Re: Using 1st edition
July 26, 2010 10:57PM
I wouldn't know because I do not have the new edition. But those with a new edition would be able to know whats new. Most authors put a section on " what's new " at the beginning of the text, outlining new content in comparison to the previous edition.
avatar Re: Using 1st edition
July 28, 2010 02:56PM
smile

Seeing as you're perfectly right there, let me try to precis it.

Ch1. Additional examples on algo analysis.
Ch3. New= dynamic 2-D arrays, virtual functions/abstract classes.
Ch5. linkedList is in an abstract class (virtual functions), and then unordered and orderedLinkedList subclasses are derived from this to implement the properties.
Ch6. A new sudoku problem, solving via recursion and backtracking.
Ch7,8. Use of abstract classes to capture basic properties of a Queue, and then implementing in subclasses.
Ch.9 Expanded discussion of hashing. (Additional examples - how to resolve collisions).
Ch.10 Added Shellsort algo.
Ch 11. B-trees section is new.
Ch 12. Euler circuits section is new.
There's also and Appendix F. Detailed analysis of insertions sort and quicksort.

Throughout, lots of new exercises and programming exercises.

So it looks like you're going to have to buy one.
Re: Using 1st edition
August 12, 2010 11:49PM
Thanx Slow
Sorry, only registered users may post in this forum.

Click here to login