Arrays: Left Rotation
A left rotation operation on an array of size shifts each of the array’s elements unit to the left. For example, if left rotations are performed on array , then the array would become .
Given an array of integers and a number, , perform left rotations on the array. Then print the updated array as a single line of spaceseparated integers.
Problem at https://www.hackerrank.com/challenges/ctciarrayleftrotation


Strings: Making Anagrams
Problem at https://www.hackerrank.com/challenges/ctcimakinganagrams Alice is taking a cryptography class and finding anagrams to be very useful. We consider two strings to be anagrams of each other if the first string’s letters can be rearranged to form the second string. In other words, both strings must contain the same exact letters in the same exact frequency For example, bacdc and dcbac are anagrams, but bacdc and dcbad are not.
Alice decides on an encryption scheme involving two large strings where encryption is dependent on the minimum number of character deletions required to make the two strings anagrams. Can you help her find this number?
Given two strings,
a
andb
, that may or may not be of the same length, determine the minimum number of character deletions required to makea
andb
anagrams. Any characters can be deleted from either of the strings.


Hash Tables: Ransom Note
Problem at https://www.hackerrank.com/challenges/ctciransomnote
A kidnapper wrote a ransom note but is worried it will be traced back to him. He found a magazine and wants to know if he can cut out whole words from it and use them to create an untraceable replica of his ransom note. The words in his note are casesensitive and he must use whole words available in the magazine, meaning he cannot use substrings or concatenation to create the words he needs.
Given the words in the magazine and the words in the ransom note, print Yes if he can replicate his ransom note exactly using whole words from the magazine; otherwise, print No.A kidnapper wrote a ransom note but is worried it will be traced back to him. He found a magazine and wants to know if he can cut out whole words from it and use them to create an untraceable replica of his ransom note. The words in his note are casesensitive and he must use whole words available in the magazine, meaning he cannot use substrings or concatenation to create the words he needs.
Given the words in the magazine and the words in the ransom note, print Yes if he can replicate his ransom note exactly using whole words from the magazine; otherwise, print No.


Linked Lists: Detect a Cycle
Problem at https://www.hackerrank.com/challenges/ctcilinkedlistcycle
Detect a cycle in a linked list. Note that the head pointer may be ‘None’ if the list is empty.


Stacks: Balanced Brackets
Problem at https://www.hackerrank.com/challenges/ctcibalancedbrackets
A bracket is considered to be any one of the following characters:
(
,)
,{
,}
,[
, or]
.Two brackets are considered to be a matched pair if the an opening bracket (i.e., (, [, or {) occurs to the left of a closing bracket (i.e., ), ], or }) of the exact same type. There are three types of matched pairs of brackets: [], {}, and ().
A matching pair of brackets is not balanced if the set of brackets it encloses are not matched. For example, {[(])} is not balanced because the contents in between { and } are not balanced. The pair of square brackets encloses a single, unbalanced opening bracket, (, and the pair of parentheses encloses a single, unbalanced closing square bracket, ].
By this logic, we say a sequence of brackets is considered to be balanced if the following conditions are met:
 It contains no unmatched brackets.
 The subset of brackets enclosed within the confines of a matched pair of brackets is also a matched pair of brackets.
Given strings of brackets, determine whether each sequence of brackets is balanced. If a string is balanced, print YES on a new line; otherwise, print NO on a new line.


Implement A Queue using Two Stacks
Problem at https://www.hackerrank.com/challenges/ctcibalancedbrackets


GCD


Find max depth of a tree


Flatten a tree


Validate BST


Tries


Merge sort to count inversions


Regular Expression Matching


Sorting: Bubble Sort


Sorting: Comparator


Binary Search: Ice Cream Parlor
Binary Search Approach By AllisonP


HashMap Solution

