This file contains 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 Solution { | |
public int missingNumber(int[] nums) { | |
for (int num : nums) { | |
jump(num, nums); | |
} | |
for (int i = 0; i < nums.length; i++) { | |
if (nums[i] != -1) return i; | |
} | |
return nums.length; | |
} |
This file contains 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
package WordLadder; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
class Solution { | |
public int ladderLength(String beginWord, String endWord, List<String> wordList) { | |
HashSet<String> c = new HashSet<>(); |
This file contains 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
package main | |
import ( | |
"fmt" | |
"testing" | |
) | |
func Test_slice(t *testing.T) { | |
arr := make([]int, 0) | |
for i := 0; i < 10; i++ { |