רשימת תפוצה
הרשמו היום לרשימת התפוצה וקבלו:
• את כל השאלות והתשובות בקובץ מרוכז אחד.
• את כל המאמרים.
• הצעות עבודה חדשות.
הכנס אימייל:
• את כל השאלות והתשובות בקובץ מרוכז אחד.
• את כל המאמרים.
• הצעות עבודה חדשות.
הכנס אימייל:
maor
עבודה וראיון עבודה ב , שאלות מראיון עבודה בנושא Algorithms.
- השאלה: הסר איבר מסוף רשימה מקושרת
התשובה:
דוגמאת קוד מצורפת:
procedure RemoveFromTail():integer
if(this is the Tail)
element = tail->info
if(this is the last item in the list)
Break pointer connection between head and tail to terminate list
release head from memory pool
else
Traverse list until you reach the tail
release tail from memory pool
set tail pointer to previous element if one exists
set tail's pointer to next element to null
end if
return element
else
return 0
end if
end procedure
דוגמאת קוד מצורפת:
procedure RemoveFromTail():integer
if(this is the Tail)
element = tail->info
if(this is the last item in the list)
Break pointer connection between head and tail to terminate list
release head from memory pool
else
Traverse list until you reach the tail
release tail from memory pool
set tail pointer to previous element if one exists
set tail's pointer to next element to null
end if
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
דוגמאת קוד מצורפת:
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
• נתקלתם באתגר במקום העבודה שאינכם יודעים איך לפתור?
• רשמו כאן את השאלה ושלחו אותה אלינו.
• אנו נפתור אותה בשבילכם ונפרסם את הפתרון באתר.
• רשמו כאן את השאלה ושלחו אותה אלינו.
• אנו נפתור אותה בשבילכם ונפרסם את הפתרון באתר.
| שאלה בנושא : Algorithms |
![]() |
||||
| שם מלא : | כתובת אימייל : | ||||
| שאלה למאגר : | |||||
הצע שאלה
שלח שאלה


