• למודעות דרושים בתחום Algorithms לחצו כאן.
בנושא: Algorithms
0 תגובות
0 תגובות
השאלה:
הסר איבר מראש רשימה מקושרת
התשובה:
דוגמאת קוד מצורפת:
procedure RemoveFromHead():integer
if(this is the Head)
element = head->info
temp = head
if(this is the last item in the list)
Break pointer connection between head and tail to terminate list
else
set head.next to equal next item in list
end if
release temp from from memory pool
return element
else
return 0
end if
end procedure
דוגמאת קוד מצורפת:
procedure RemoveFromHead():integer
if(this is the Head)
element = head->info
temp = head
if(this is the last item in the list)
Break pointer connection between head and tail to terminate list
else
set head.next to equal next item in list
end if
release temp from from memory pool
return element
else
return 0
end if
end procedure
לשאלה זו אין כרגע תגובות.
| תגובה לשאלה מספר : 750 בנושא : Algorithms |
![]() |
||||
| שם מלא : | כתובת אימייל : | ||||
| תוכן תגובה : | |||||
הוסף תגובה
שלח תגובה



