Skip to content

ygsh0816/coding-challenges

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coding Challenges

The following coding challenges were done either for fun, or as part of a job interview. If done for an interview, the company's name is in parentheses. If done on a public-facing coding challenge website, the website is listed after the hyphen.

Almost Sorted Intervals - HackerRank

Given a sequence of numbers, how many "almost sorted intervals" (first number is lowest and last number is highest, but the middle can be in any order) can be found?

Anagram (for Hired)

Given a string, determine if it is an anagram.

Basic Cryptanalysis - HackerRank

Given a dictionary and some ciphertext encoded using a substitution cipher, find the corresponding plaintext.

Binary Complement (for Clear Channel) - HackerRank

Given an integer, compute its binary complement, then return the complement as an integer.

FizzBuzz (for Clear Channel) - HackerRank

The classic. For integers 1 to N, if n is divisible by 3 print "Fizz", if it's divisible by 5 print "Buzz", and if it's divisible by both print "FizzBuzz".

FizzBuzz - CodeEval

A slight variation on the classic-- instead of factors of 3 and 5, the factors are provided at runtime.

Fragments (for City Maps)

Create an app that when in portrait mode has two activities, each with its own fragment, but when in landscape mode has the two fragments in a single activity.

Love Letter - HackerRank

Given a string, what are the minimum number of "stepping down" operations (changing a letter to the one before it in the alphabet) needed to make the string an anagram?

Triangle Pass - CodeEval

Given an input file that has one integer on the first line, two on the second line, three on the third, and so forth, in the shape of a triangle, traverse down the lines starting with the first number then down to an adjacent lower number (one position to the left left or right) and keep a running sum as you go. What is the maximum sum that can be found for a path down the triangle?

Utopia Tree - HackerRank

Given a tree that grows 1 meter in the spring and double in the fall, how tall is it after N growth cycles?

Valid Braces (for Hired)

Given a string of braces (curly, square, and parenthesis), validate that the braces are properly nested according to type.

About

Various coding challenges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%