This is my solution to challenge “Linked Lists: Detect a Cycle” on HackerRank. Click here to see the challenge. /* Detect a cycle in a linked list. Note that the head pointer may be 'null' if the list is empty. A Node is defined as: class Node...
This is my solution to challenge “Queues: A Tale of Two Stacks” on HackerRank. Click here to see the challenge. import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static...
This is my solution to challenge “Stacks: Balanced Brackets” on HackerRank. Click here to see the challenge. import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static HashMap<...
This is my solution to challenge “Hash Tables: Ransom Note” on HackerRank. Click here to see the challenge. import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void...
This is my solution to challenge “Strings: Making Anagrams” on HackerRank. Click here to see the challenge. import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int...
This is my solution to challenge “Trees: Is This a Binary Search Tree?” on HackerRank. Click here to see the challenge. import java.io.*; /* Hidden stub code will pass a root argument to the function below. Complete the function to solve the challenge....