Optimal Buy and Sell Time for Given Stock
Figure out the optimal buy and sell time for a given stock, given its prices yesterday.
Product of All Other Numbers
For each number in an array, find the product of all the other numbers. You can do it faster than you'd think!
Highest Possible Product of Three Numbers
Find the highest possible product that you can get by multiplying any 3 numbers from an input array.
Merging Meeting Times
Write a function for merging meeting times given everyone's schedules. It's an enterprise end-to-end scheduling solution.
Role of Cashier
Write a function that will replace your role as a cashier and make everyone rich.
Area of Overlap Between Two Rectangles
Find the area of overlap between two rectangles.
Max, Min, Mean, and Mode Tracker
Write code to continually track the max, min, mean, and mode as new numbers are inserted into a tracker class.
Superbalanced Binary Tree
Write a function to see if a binary tree is 'superbalanced'.
Valid Binary Search Tree
Write a function to check that a binary tree is a valid binary search tree.
Second Largest Element in BST
Find the second largest element in a binary search tree.
Data Structures for Search Engine
I'm making a new search engine called MillionGazillion(tm) and I need help figuring out what data structures to use.
Check Number Presence in Sorted Array
Given an array of numbers in sorted order, how quickly could we check if a given number is present in the array?
Untangling Big Words
Write a function to help untangle the mess I made.
Movie Recommendation Algorithm
Writing a simple recommendation algorithm that helps people choose which movies to watch during flights.
Nth Fibonacci Number
Computer the nth Fibonacci number.
Cake Vault Profit Maximization
Figure out how much of each cake to carry out to maximize profit.
JavaScript Scope Puzzle
There's something tricky going on with scope in this JavaScript. Can you guess what will get logged to the console?
JavaScript Bug Finding
There's a tricky bug in this JavaScript. Can you find it?
Queue with Two Stacks
Implement a queue with two stacks. Assume you already have a stack implementation.
LargestStack Class
Write an augmented LargestStack class to access the largest element from time to time.
Missing Drone in Delivery
Write a function to figure out which drone is missing.
Delete Node from Linked List
Write a function to delete a node from a linked list.
Detect Cycle in Linked List
Check to see if a linked list has a cycle.
Reverse Linked List
Write a function to reverse a linked list in place.
Kth to Last Node in Linked List
Find the kth to last node in a singly-linked list.
Reverse a String
Write a function to reverse a string in place.
Reverse Word Order
Write a function to reverse the word order of a string in place.
Matching Parenthesis
Write a function that finds the corresponding closing parenthesis given the position of an opening parenthesis in a string.
JavaScript Parser for Bugs
Write a super-simple JavaScript parser that can find bugs in your intern's code.
Palindrome Permutation
Check if any permutation of an input string is a palindrome.
Generate String Permutations
Write a recursive function of generating all permutations of an input string.
Efficiently Sort Numbers
Efficiently sort numbers in an array, where each number is below a certain maximum.
Find Repeated Number
Find the repeat number in an array of numbers. Optimize for runtime.
Word Cloud Frequency Count
You're building a word cloud. Write a function to figure out how many times each word appears.
In-Place Shuffle
Do an in-place shuffle on an array of numbers.
Cafe Customer Order Sequence
Write a function to tell us if cafe customer orders are served in the same order they're paid for.
5-Sided Die from 7-Sided Die
Given a 7-sided die, make a 5-sided die.
7-Sided Die from 5-Sided Die
Given a 5-sided die, make a 7-sided die.
Egg Drop Problem
A building has 100 floors. Figure out the highest floor an egg can be dropped from without breaking.
Repeated Number Optimization for Space
Figure out which number is repeated but optimize for space.
Repeated Number in Linear Time
Figure out which number is repeated but do it in linear time and constant space.
Undo File Damage
Write a function to undo the damage done by copying files around your hard drive.
Consolidating Cookie Orders
Write a function for consolidating cookie orders and taking over the world.
URL Shortener
Design a URL shortener, like bit.ly.
Graph Node Coloring
Color the nodes in a graph so adjacent nodes always have different colors.
Messaging App Delay
You wrote a trendy new messaging app, MeshMessage, but messages are taking too long to send.