- Location: Seattle, WA
- Phone: (516) 547-8397
- Email: nhuntwalker@gmail.com
- Github: github.com/nhuntwalker
- LinkedIn: /in/nhuntwalker
- Personal Site: rationalwhimsy.com
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
| Write a function to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x. | |
| [ 4 ] -> [ 3 ] -> [ 1 ] -> [ 2 ] -> [ 5 ] | |
| x = 2.5 | |
| [ 1 ] -> [ 2 ] -> [ 4 ] -> [ 3 ] -> [ 5 ] | |
| Email to: nicholas@codefellows.com by 9:50am |
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
| Add Linked Lists of Numbers | |
| You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1's digit is at the head of the list. Write a function that adds the two numbers and returns the sum as a linked list. | |
| Ex: | |
| 438 + 123 = 561 | |
| [ 8 ] -> [ 3 ] -> [ 4 ] | |
| + | |
| [ 3 ] -> [ 2 ] -> [ 1 ] |
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
| You're given a grid of 1's and 0's. | |
| A cluster of 1's corresponds with every 1 that has 1 as a neighbor to the left, right, up, or down. | |
| Return an array of the size of each cluster of 1's in the grid. | |
| Example: | |
| input = [ | |
| [1,1,1,0,0,0,0], | |
| [1,1,0,0,0,0,1], | |
| [0,0,0,0,1,0,1], |
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
| Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column are set to 0. | |
| Ex: | |
| input matrix = [ | |
| [0, 2, 3, 4, 5], | |
| [6, 7, 8, 9, 10], | |
| [1, 5, 0, 7, 33], | |
| [6, 7, 8, 9, 10], | |
| [6, 7, 8, 9, 10], |
OlderNewer