This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This question is asked by Amazon. Given a string representing the sequence of moves a robot vacuum makes, | |
* return whether or not it will return to its original position. The string will only contain L, R, U, and D characters, | |
* representing left, right, up, and down respectively. | |
* | |
* Ex: Given the following strings... | |
* | |
* "LR", return true | |
* "URURD", return false | |
* "RUULLDRD", return true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* In this chapter, you’ll learn about the Big O notation for the different levels of scalability in two dimensions: | |
* • Execution time. | |
* • Memory usage. | |
*/ | |
fun main() {} | |
/** Constant time * | |
* A constant time algorithm is one that has the same running time regardless of the size of the input. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
UBER | |
Description of Question | |
The goal is to write a function which takes a | |
list of string items and returns a list containing | |
unique items sorted based on their frequency in descending order | |
Example: | |
input = I -> am -> happy -> so -> I -> sing -> happy -> happy -> songs | |
output = happy -> I -> am -> so -> sing -> songs |
NewerOlder