Twa kɔ nsɛm atitiriw so
Log in
Sign up for FREE
arrow_back
Laabri

Linked List Worksheet 3

star
star
star
star
star
Last updated over 2 years ago
2 Nsɛmmisa
1
Asemmisa {{asɛmmisaAhyɛnsode}}
1.

Part 1 : Complete method skipEveryOther().

//method skipEveryOther will remove every other node

public void skipEveryOther(ListNode list)

{

//// Code goes here ////

}

1
Asemmisa {{asɛmmisaAhyɛnsode}}
2.

Part 2 : Complete method doubleUp().

//method doubleUp will double the size of the list by adding in

//new nodes with the same values as the original list nodes

public void doubleUp(ListNode list)

{

////// Code goes here //////

}