Problem: Given a string, check if any permutations of that string are a palindrome Solution 1: Use a hashtable to count each time a character is used
Author Archives: Alana
Calculate Angle Between Clock Hands
Problem: Calculate the angle between clock hands when given the number that each cock hand is at (ie. hour hand is at the 12, minute hand is at the 3, result should be 90°). Solution 1: Calculate Angle with inputs as clock face number Solution 2: Calculate smaller angle for precise time
Implement a queue using stacks.
Problem: Implement a queue using stacks. Solution 1: Use a helper stack
Implement a stack using queues.
Problem: Implement a stack using queues. Solution 1: Use a helper queue
Get Height of Binary Tree
Problem: Get the height of a binary tree. Solution 1: Iterate Solution 2: Recursive
Traverse Binary Tree: Depth First
Problem: Traverse a given binary tree, depth first. Solution 1: Iterate via a Stack
Traverse Binary Tree: Breadth First
Problem: Traverse a given binary tree, breadth first. Solution 1: Iterate via a Queue