Professional Documents
Culture Documents
Bagrut Questions
Bagrut Questions
Bagrut Questions
{
int c = 0;
while(indicator != null)
{
c++;
indicator =indicator.GetNext();
}
return c;
}
______________________________________________________________________
p=p.GetNext();
}
return true;
}
public static Node<int> Build(Node<int> lst) // bagrut
{
while (p != null)
{
int value = p.GetValue();
if (newLst == null)
{
newLst = new Node<int>(digit);
temp = newLst;
}
else
{
temp.SetNext(new Node<int>(digit));
temp = temp.GetNext();
}
temp.SetNext(new Node<int>(-9));
temp = temp.GetNext();
p = p.GetNext();
}
return newLst;
}