Skip to content

Problem Definition #1

Description

@La-Volpe

Overview

The goal is to create an Android app that performs a GET request to an HTTP endpoint that returns a JSON file. The response should be parsed and displayed in a list view.

Note: Since the REST service is under development, testing should be done using a local/mock response. Design your solution in a way that switching to the final implementation is straightforward.

Sample JSON Response

{
  "numbers": [4, 150, 12, 21, 136, 16, 3]
}
  • Each number will be in the range 0...255 (1 Byte).
  • The response can be malformed, contain flaky connections, or include invalid numbers.

Parsing Logic

Each number (byte) must be interpreted as follows:

  • Two least significant bits (LSB): "section index"
  • Most significant bit (MSB): "item checkmark"
  • Remaining intermediate bits: "item value"

Section Mapping

Index Section
0 SECTION1
1 SECTION2
2 SECTION3
3 SECTION4

Item Mapping

Use the format Item<<item value + 1>>:

Value Item
0 Item1
1 Item2
2 Item3
3 Item4
4 Item5
5 Item6

Checkmark Mapping

Bit State
0 Unchecked
1 Checked

Example

Value: 140
Binary: 10001100b

→ Section Index: 00 = 0 → SECTION1  
→ Item Value: 00011 = 3 → Item4  
→ Checkmark: 1 = checked

Display & Layout

  • Group items by their corresponding section.
  • Sort both sections and items in ascending order.
  • Display layout example:
-----------------------
SECTION1
-----------------------
Item4 √
-----------------------
Item5
-----------------------
SECTION2
-----------------------
Item2 √
-----------------------
  • No fancy UI needed — a plain list with basic entries is sufficient.

Requirements

  • Written in Kotlin using Jetpack Compose and Coroutines
  • Clean, well-structured, maintainable code
  • Robust network error handling
  • Full Gradle project, ready to run in Android Studio

Bonus Points

  • Implement the parsing logic in C++ using Android NDK (for cross-platform reuse)
  • Modular architecture (e.g., exposing data source as an Android library module)
  • Add unit and instrumented tests
  • Use Gradle Kotlin DSL

Final Notes

  • The task does not need to be perfect — aim to finish in one day.
  • Prioritize key functionality and document any trade-offs or areas with assumptions.
  • Feel free to make reasonable assumptions if something seems ambiguous — just write them down.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions