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
| public class NumberOfIslands | |
| { | |
| public static int NumIslands(char[][] grid) | |
| { | |
| int numberOfIslands = 0; | |
| for (int i = 0; i < grid.Length; i++) | |
| { | |
| for (int j = 0; j < grid[i].Length; j++) | |
| { | |
| if (grid[i][j] == '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
| public class LRUCache(int capacity) | |
| { | |
| public class ListNode(int key, int value) | |
| { | |
| public readonly int Key = key; | |
| public int Value = value; | |
| public ListNode Prev; | |
| public ListNode Next; | |
| } |