Submitted by: Mohammad Sajid Anwar
Write a function that takes a 4-digit integer and returns how many iterations are required to reach Kaprekar's constant (6174). For more information about Kaprekar's Constant please follow the wikipedia page.
| # The Weekly Challenge - 358 | |
| ##### Early Bird Club members ONLY | |
| ## Task 1: Max Str Value | |
| ##### **Submitted by:** [Mohammad Sajid Anwar](https://manwar.org) | |
| You are given an array of alphanumeric string, `@strings`. | |
| Write a script to find the max value of alphanumeric string in the given array. The numeric representation of the string, if it comprises of digits only otherwise length of the string. |
Write a function that takes a 4-digit integer and returns how many iterations are required to reach Kaprekar's constant (6174). For more information about Kaprekar's Constant please follow the wikipedia page.
manwar@manwar:~/github/manwar.org/public/stats$ gen-adopted-dist | jq --sort-keys --indent 4 '.' > adopted-distributions.json
manwar@manwar:~/github/manwar.org/public/stats$ gen-personal-dist a d | jq --sort-keys --indent 4 '.' > pd-a-d.json
manwar@manwar:~/github/manwar.org/public/stats$ gen-personal-dist e z | jq --sort-keys --indent 4 '.' > pd-e-z.jsonUpdate year manually in the file:
You are given an integer, $int > 3.
Write a script to generate the Kolakoski Sequence of given length $int and return the count of 1 in the generated sequence. Please follow the wikipedia page for more informations.
You are given a positive integer, $int.
Write a script to add thausand separator, , and return as string.
You are given an array of distinct integers.
Write a script to find all pairs of elements with the minimum absolute difference.
You are given an array of sentences.
Write a script to return the maximum number of words that appear in a single sentence.
You are given an array of strings.
Write a script to return all strings that are a substring of another word in the given array in the order they occur.
You are given an array of integers.
Write a script to return the average excluding the minimum and maximum of the given array.
You are given a string.
Write a script to return the number of good substrings of length three in the given string.