Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Hw{
- public static void main(String[] args) {
- Node<Integer> nd1 = new Node<Integer>(51);
- Node<Integer> nd2 = new Node<Integer>(50, nd1);
- Node<Integer> nd3 = new Node<Integer>(20, nd2);
- Node<Integer> nd4 = new Node<Integer>(15, nd3);
- Node<Integer> nd5 = new Node<Integer>(12, nd4);
- Node<Integer> node1 = new Node<Integer>(46);
- Node<Integer> node2 = new Node<Integer>(44, node1);
- Node<Integer> node3 = new Node<Integer>(42, node2);
- Node<Integer> nd = append_By_Value(nd5, node3);
- }
- //given two chains u need to connect them by the correct numeric order
- public static Node<Integer> append_By_Value(Node<Integer> ndList1, Node<Integer> ndList2){
- //addcode here
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement