30秒学会 Golang 片段 – HammingDistance
Calculates the Hamming distance between two values. Use the XOR operator (^) to find the bit differe...
Calculates the Hamming distance between two values. Use the XOR operator (^) to find the bit differe...
Returns true if no elements in the collection pass the test implemented by the provided function, fa...
Returns the sum of two or more numbers. Use range to iterate over the values of nums, adding each va...
Checks if a string is lower case. Use strings.ToLower() to convert the string to lower case and comp...
Converts Fahrenheit to Celsius. Follows the conversion formula C = (F – 32) * 5/9.
Returns true if the given string is a palindrome, false otherwise. Use strings.Fields(), strings.Joi...
Converts Celsius to Fahrenheit. Follows the conversion formula F = 1.8C + 32.
Creates a new slice out of the two supplied by creating each possible pair from the collections. Use...
Converts a string to kebab case. Use range and strings.Fields() to iterate over the words in the str...
Returns the index of the last element in the provided collection that satisfies the provided testing...