Jump to content

Recommended Posts

Posted

I am currently stuck on this problem

 

Complete the following method that determines if two chains of nodes are equal, that is, they have the same strings in the same order. Note two empty chains are considered equal.

    public static boolean equals(Listnode<String> chain1, Listnode<String> chain2) {

I do not understand how i am supposed to compare the two chians without being able to use an index like you can for arrays.

ANy help would be greatly apprciated

Posted

I do not understand how i am supposed to compare the two chians without being able to use an index like you can for arrays.

How do you get access to the nodes in the lists?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.