This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
public static void main(String[] args) { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Insert Node at the end of a linked list | |
head pointer input could be NULL as well for empty list | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
Node prev; | |
} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Insert Node at the end of a linked list | |
head pointer input could be NULL as well for empty list | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
Node prev; | |
} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Insert Node at the end of a linked list | |
head pointer input could be NULL as well for empty list | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
} | |
*/ | |
int FindMergeNode(Node headA, Node headB) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Insert Node at the end of a linked list | |
head pointer input could be NULL as well for empty list | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
} | |
*/ | |
int HasCycle(Node head) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
} | |
*/ | |
Node RemoveDuplicates(Node head) { | |
// This is a "method-only" submission. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Insert Node at the end of a linked list | |
head pointer input could be NULL as well for empty list | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
} | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Insert Node at the end of a linked list | |
head pointer input could be NULL as well for empty list | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Insert Node at the end of a linked list | |
head pointer input could be NULL as well for empty list | |
Node is defined as | |
class Node { | |
int data; | |
Node next; | |
} | |
*/ | |
int CompareLists(Node headA, Node headB) { |
NewerOlder