随笔分类 - CodeWars
摘要:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice The slice() method returns a shallow copy of a portion of
阅读全文
摘要:https://www.codewars.com/kata/binary-operations-number-1/train/csharp Your work is to write a method that takes a value and an index, and returns the
阅读全文
摘要:https://www.codewars.com/kata/zip-it/train/csharp 优化: return a.Select((t, i) => fn(t, b[i])).ToArray();
阅读全文
摘要:https://www.codewars.com/kata/printing-array-elements-with-comma-delimiters/train/csharp 关于数组类型的判断,可以使用 a.GetType().IsArray
阅读全文
摘要:http://stackoverflow.com/questions/3723934/using-propertyinfo-to-find-out-the-property-type https://www.codewars.com/kata/56c22c5ae8b139416c00175d/tra
阅读全文
摘要:string[][]和string[,] http://www.codewars.com/kata/56f3a1e899b386da78000732/train/csharp Write a function partlist that gives all the ways to divide a
阅读全文
摘要:http://www.codewars.com/kata/566f571ed78037c7b6000036/train/csharp You don't have any idea what is the type of the input object, but you know that it
阅读全文
摘要:Description: Your task is simply to count the total number of lowercase letters in a string. Examples LowercaseCountCheck("abc") == 3 LowercaseCountCh
阅读全文
摘要:Given a string, determine if it's a valid identifier.Here is the syntax for valid identifiers:Each identifier must have at least one character.The fir...
阅读全文
摘要:http://www.codewars.com/kata/55c423ecf847fbcba100002b/train/csharpOh no, Timmy's received some hate mail recently but he knows better. Help timmy fix ...
阅读全文
摘要:Description:Hey Codewarrior!You already implemented aCubeclass, but now we need your help again! I'm talking about constructors. We don't have one. Le...
阅读全文
摘要:http://www.codewars.com/kata/smallest-unused-idDescription:Hey awesome programmer!You've got much data to manage and of course you use zero-based and ...
阅读全文
摘要:Which are in?Given two arrays of strings a1 and a2 return a sorted array in lexicographical order and without duplicates of the strings of a1 which ar...
阅读全文
摘要:IQ TestDescription:Bob is preparing to pass IQ test. The most frequent task in this test isto find out which one of the given numbers differs from the...
阅读全文
摘要:Good vs EvilDescriptionMiddle Earth is about to go to war. The forces of good will have many battles with the forces of evil. Different races will cer...
阅读全文
摘要:Sum of Digits / Digital RootIn this kata, you must create adigital rootfunction.A digital root is therecursive sum of all the digits in a number.Given...
阅读全文
摘要:Multiples of 3 and 5If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.F...
阅读全文
摘要:A number system with moduli is defined by a vector of k moduli, [m1,m2, ···,mk].The moduli must be pairwise co-prime, which means that, for any pair of...
阅读全文
摘要:Case swappingDescription:Given a string, swap the case for each of the letters.e.g. CodEwArs --> cODeWaRSExamplesKata.Swap("") == ""Kata.Swap("CodeWar...
阅读全文
摘要:Binary to Text (ASCII) ConversionDescription:Write a function that takes in a binary string and returns the equivalent decoded text (the text is ASCII...
阅读全文