Driver code
int main ( ) { struct Node * head1 = NULL ; push ( & head1 , 20 ) ; push ( & head1 , 5 ) ; push ( & head1 , 15 ) ; push ( & head1 , 10 ) ; struct Node * head2 = NULL ; push ( & head2 , 10 ) ; push ( & head2 , 2 ) ; push ( & head2 , 15 ) ; push ( & head2 , 8 ) ; cout << firstCommon ( head1 , head2 ) ; return 0 ; }