public class Solution
{
public IList<string> WordBreak(string s, IList<string> wordDict)
{
var result = new List<string>();
Trie.Alphabet = new HashSet<int>();
var rootTrie = new Trie();
for (var i = 0; i < wordDict.Count; i++)
{
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
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ | |
void FUN_0060efd0(char *param_1,undefined4 param_2) | |
{ | |
int iVar1; | |
iVar1 = __strcmpi(param_1,s_French_Lower_Division_009dc200); | |
if (iVar1 == 0) { |
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
func main() { | |
ebiten.SetWindowSize(1280, 640) | |
ebiten.SetWindowTitle("Wordy") | |
if err := ebiten.RunGame(&wordy.Game{}); err != nil { | |
panic(err) | |
} | |
} | |
func (g *Game) Layout(outsideWidth int, outSideHeight int) (screenWidth int, screenHeight int) { | |
return ScreenWidth, ScreenHeight |
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 bool DetectCapitalUse(string word) | |
{ | |
if (word.Length == 1) return true; | |
Func<char, bool> condition; | |
if (word[0] <= 'Z' && word[1] <= 'Z') | |
condition = c => c <= 'Z'; | |
else | |
condition = c => c >= 'a'; |
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 bool DetectCapitalUse(string word) | |
{ | |
if (word.Length == 1) return true; | |
if (word[0] <= 'Z' && word[1] <= 'Z') | |
{ | |
for (var i = 2; i < word.Length; i++) | |
{ | |
if (word[i] <= 'Z') continue; | |
return false; | |
} |
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 bool DetectCapitalUse(string word) | |
{ | |
var capitals = 0; | |
for (var i = 0; i < word.Length; i++) | |
{ | |
if (char.IsUpper(word[i])) capitals++; | |
} | |
if (capitals == word.Length || capitals == 0) return true; | |
return capitals == 1 && char.IsUpper(word[0]); |
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 bool DetectCapitalUse(string word) | |
{ | |
var n = word.Length; | |
bool match1 = true, match2 = true, match3 = true; | |
// case 1: All capital | |
for (int i = 0; i < n; i++) | |
{ | |
if (!char.IsUpper(word[i])) | |
{ |
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
namespace Mathematics.Code | |
{ | |
public class Number | |
{ | |
public static double Power(double x, double y) | |
{ | |
var result = 1.0; | |
var p = (int)y; | |
while (p != 0) | |
{ |