fbpx

#KotlinDevChallenge 2023

  • #kotlinDevChallenge – 1

    Your task is to modify the function so that it returns e.x <strong><em><span style="text-decoration: underline;">Kotlin is awesome and so called "birds" fly key</span></em></strong> if the input is birds. Note that the word “birds” is placed in quotation marks. How do you handle such a case with special characters? ps. There are few ways to achieve…

  • #kotlinDevChallenge – 2

    Second day of our challenge… This time you will face collections. Specifically, a list that has acquired duplicates. We don’t like duplicates. Let’s get rid of them! ps. Again – there are few ways to achieve that πŸ™‚

  • #kotlinDevChallenge – 3

    Write a function that takes a natural number and returns its successive digits as a list (e.g., for the number 1234, it returns listOf(1, 2, 3, 4). Input: Long is a natural number – meaning it is non-negative. ps. Again – there are few ways to achieve that πŸ™‚

  • #kotlinDevChallenge – 4

    A Coordinates class and an infix extension operator function that operates on these Coordinates are given. Take a good look. Several funny operations can be performed on the vals a and b. What does the function infix operator fun Coordinates.plus allow us to do?

  • #kotlinDevChallenge – 5

    Your task today is to implement a toggle mechanism using Kotlin Flow. How should it work? Each time the flow source emits “something” – in this case, Unit – you should emit the negated previous value. For the input: false, flowOf(Unit, Unit) you should create a flow: flowOf(false, true, false) In this snippet, the entire…

  • #kotlinDevChallenge – 6

    Write a function that takes a string and returns a map where each key is a character and its value is the number of its occurrences in the given string. For example, for the string “kotlin”, the function should return the map: {k=1, o=1, t=1, l=1, i=1, n=1}. Complete the code of the countCharacters function.

  • #kotlinDevChallenge – 7

    Write a function that takes a string and returns a modified version where each word is reversed, and additionally, the case of each letter is inverted (uppercase to lowercase and vice versa). Punctuation marks and spaces should remain unchanged. For example, given the string "Hello Kotlin!", the function should return "OLLEh NILTOk!". Complete the code…

  • #kotlinDevChallenge – 8

    data class A is given. We create an instance of this class and then call the .copy() function. What will be printed out? Mark correct answer and submit form.

  • #kotlinDevChallenge – 9

    Write a function that takes a list of lists of integers and returns a single list containing all unique elements. Ensure that the resulting list contains only unique elements. For example, given the input [[1, 2, 3], [3, 4, 5], [5, 6]], the function should return [1, 2, 3, 4, 5, 6]. Complete the code…

  • #kotlinDevChallenge – 10

    Implement a function that sums the first 5 even numbers from each of three given integer Flows and returns their total sum. Properly handle empty Flows. If a Flow is empty or if all its elements are filtered out, it should contribute 0 to the final sum.

  • #kotlinDevChallenge – 11

    Write a Kotlin function to parse CSV data provided as a string, and return the data in a structured format. The CSV data will be provided as a single string, where each line represents a row and each value is separated by a comma. The function should parse this string and convert it into a…

  • #kotlinDevChallenge – 12

    NetworkResponse class is given. Which of the following statements is true regarding this NetworkResponse class? Mark all correct answers and submit form.

  • #kotlinDevChallenge – 13

    Implement a string compressor Write a function that takes a string and returns a compressed version, where consecutive duplicate characters are replaced with a single character followed by the number of repetitions. For example, “aabccc” becomes “a2bc3”.

  • #kotlinDevChallenge – 14

    Your task is to design a User class The email property should be implemented in such a way that each time it is modified (assigned a new unique value), the howManyTimesEmailEdited property increments. The initial setting of the email in the constructor should not count as a modification. ps. Again – there are few ways…

  • #kotlinDevChallenge – 15

    Understanding when a Kotlin sequence evaluates its elements is crucial to effectively using sequences in Kotlin, especially for performance optimization. When does a Kotlin sequence evaluate its elements? Mark all correct answers and submit form.

  • #kotlinDevChallenge – 16

    Create a Kotlin function to determine whether two given strings are anagrams of each other, ignoring case and any non-alphabetic characters. An anagram uses all the original letters exactly once. Task Description:

  • #kotlinDevChallenge – 17

    Implement extension functions plus and minus to perform vector addition and subtraction. Task Description: Example usage:

  • #kotlinDevChallenge – 18

    Challenge testing your stdlib knowledge πŸ™‚ Code snippet is given: The question is… what will be printed? Or maybe exception will be thrown?

  • #kotlinDevChallenge – 19

    Create a Kotlin function that takes a URL string as input and extracts various components from it, such as the protocol, domain, path, and query parameters. Task Description: Test cases

  • #kotlinDevChallenge – 20

    Challenge testing your stdlib knowledge πŸ™‚ The tailrec modifier in Kotlin is used to optimize tail-recursive functions, converting them into loops internally to prevent stack overflow errors. The question is…

  • #kotlinDevChallenge – 21

    Very fun challenge today. Your task is to… make the code compile. Task Description: We want to be able to use destructive declaration on state: State

  • #kotlinDevChallenge – 22

    Write a function to aggregate sales data from a list of transactions, each containing multiple product IDs. Use a ProductsDatabase class with methods to retrieve product details by ID and to get all products. The function should return the names of the most sold products. Include an option to limit the number of product names…

  • #kotlinDevChallenge – 23

    Challenge checking your generics knowledge πŸ™‚ No long description is necessary. You can select more than one answer. Good luck!

  • #kotlinDevChallenge – 24

    What do you love most about Kotlin? Productivity increase? Idioms? Or that it isn’t Java? Maybe something else! Share it. It can be short. It can bo longer. You’ll get your point if the answer won’t be screaming “I was generated by AI”.


challenge for all Kotlin enthusiasts!
  • Daily Kotlin challenges from Dec 1st to Dec 24th
  • New challenge every day sent by email and on Instagram story
  • If you want to take part in challenge, submit your email below

#kotlinDevChallenge is hosted by…



JarosΕ‚aw Michalik

Google Developer Expert (GDE) in Kotlin with a passion for elevating the Android development community.

Working professionally as an Android dev since 2016, he dedicated himself to helping clients establish robust development processes, ensuring their projects not only launch but thrive in the competitive app market.