6 stories

Given a string, return whether it is made of a perfectly repeated string pattern.

677 views Amin A.

You have a directed connected graph. Write an algorithm that detects any cycle, if one exists, and returns a list of its nodes.

811 views Amin A.

I take n consecutive integers, toss one of them out and mix up the remaining n-1 integers as completely unsorted. Find the missing integer.

795 views Amin A.

Given a Singly Linked List, write an algorithm to find the middle node. You may not use more than one loop of any kind.

736 views Amin A.

Then calculate the average time complexity of inserting n new items into an empty brand new ArrayList.

716 views Amin A.

You are given n, a positive integer. Return true if n is a prime number, and false if it's not.

723 views Amin A.