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

عرض كامل الموضوع : ساعدوني في ال Data Structures & Algorithms



darkangel ^-^
12-11-2008, 14:27
السلام عليكم
ارجووووكم في حد يقدر يساعدني وان شاء الله ربنا يجازيه خير
انا عندي هالواجب الي طير عقلي وما في حد عارف يحله وما عندي احد يفهم في هالموضوع
فالي يقدر يحلله لي
ربنا يوفقه وان شاء الله بردها له
:ميت:
هذا هوه الواجب



(a) Add a member function ReturnLastItem () to the UnsortedType ADT that returns the last element in the list. The function has the following prototype:
ItemType ReturnLastItem();

Preconditions: List is initialized and not empty.

Postconditions: List is unchanged.

(b) Add a member function GreaterThanItem () to the UnsortedType ADT that returns the number of elements which are greater than a given item. The given item is passed as a parameter to the function. The function has the following prototype:
int GreaterThanItem(ItemType givenItem);

(c) Write a recursive client function that prints the elements of a stack (linked implementation) in reverse order (from bottom to top). The function has the following specification:
void printStackReverse(StackType stack)
Function: Prints the elements of stack in reverse order (from bottom to top).
Precondirtion: Stack is not empty.
Postcondition: Stack is not changed.

Note: Assume that ItemType is defined as
typedef int ItemType;




يقدر يحل يحل الي يهاهم كلهم:D
او على الاقل واحد منهم::جيد::
ومشكوووووووووووووورين :ميت:
ساعدوني :بكاء:

almazuoona
12-11-2008, 19:58
لا حول ولا قوه الا بالله ....نحن يا dark angle
المعذبون في الارض...يلا انا بنتظر حد يرد عليكي ...ولو حد عرف بشريني الله يخليك هاهاهاهاهاهاهاها

darkangel ^-^
15-11-2008, 15:29
Heeeeeeeeeeeeeeelp
some body any body
حررررام حد يرد علي

(a) Add a member function ReturnLastItem () to the UnsortedType ADT that returns the last element in the list. The function has the following prototype:
ItemType ReturnLastItem();
Preconditions: List is initialized and not empty.
Postconditions: List is unchanged.



(b) Add a member function GreaterThanItem () to the UnsortedType ADT that returns the number of elements which are greater than a given item. The given item is passed as a parameter to the function. The function has the following prototype[/CENTER]:
int GreaterThanItem(ItemType givenItem);




(c) Write a recursive client function that prints the elements of a stack (linked implementation) in reverse order (from bottom to top). The function has the following specification:
void printStackReverse(StackType stack)
Function: Prints the elements of stack in reverse order (from bottom to top).
Precondirtion: Stack is not empty.
Postcondition: Stack is not changed.

Note: Assume that ItemType is defined as
typedef int ItemType;

nonete
20-11-2008, 11:50
me too i need help in this homework.....

plz help plz help

snake-eye
24-11-2008, 00:17
كلكم فنفس الجامعه وهب قاادرين عليه؟

almazuoona
25-11-2008, 09:56
اتخيل :|.....سبحان الله ....اذا تقدر تساعدنا لا تقصر

MysteriousGirl
25-11-2008, 13:55
أنا خلاص فقدت الأمل !! :(
خلاص زهقت :بكاء:
شكلي رح أرضى بالزيرو نفس ما قالت dark angel
!!
ما في حل تاني !!:ميت:

تحدوِهِـِِ ألبشِ ـ}ـِِـر
26-11-2008, 19:49
؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ظ

Imagine Breaker
26-11-2008, 20:12
ربنا يسهلك يا بنتي .. لا املك سوى الدعاء لك ..

وحسبي الله ونعم الوكيل .. التعليم خرب ياناس ..

snake-eye
27-11-2008, 00:04
الله كريم
^
^
^
^
^
ملاااحظة: تراا الدكتور سيد معطنكم وقت واايد صرااحه
فشدوا حيلكم شوي!!!

almazuoona
28-11-2008, 16:15
شدينا حيلنا لين ما انقطع....اعطانا وقت وايد لانه مش عارف لا يشرح لنا ولا عارف يلغي الي اعطانا ياه هذي المره الخامسه الي ياجل التسليم...بنشوف اخرتها

Zanzibar
01-01-2009, 18:01
السلام عليكم


list * ReturnLastItem(list * l)
{list * p;
for(p=l;p->next!=NULL;p=p->next) ;
return p;
}

int GreaterThanItem(list * l,ItemType givenItem)
{list * p; int s=0;
for(p=l;p->next!=NULL;p=p->next)
if(p->item > givenItem)s++;
return s;
}

void printStackReverse(StackType stack)
{int i=0;
while(stack.t[i]!=stack.top;)
{ printf("\n%d",stack.t[i]);
i++;
}

}


في الأولى و الثانية فرضت أن اسم البنية هو list وهي dynamic
في الثالثة فرضت أنك تستعمل (Array(tableau لأني لم افهم السؤال جيدا لاننا درسناها بالفرنسية.

laylaa
08-01-2009, 09:23
هههههههههه
ذكرتوني بأيام الداتا ستركشتر ياهي كانت ايام كئيبه

almazuoona
13-02-2009, 23:00
شكرا اخوي Zanzibar.....للاسف جيت متاخر ولا كنا بنستفيد من حلك....بس نحن صار لنا اكثر من شهر مخلصين الكورس الماضي وبدينا بالكورس الثاني...والحمدلله كلنا نجحنا :)))))باعجوبه