Giter Club home page Giter Club logo

cities's Introduction

Mobile assignment RnD

The goal of this assignment is to evaluate the problem solving skills, UX judgement and code quality of the candidate.

We have a list of cities containing around 200k entries in JSON format. Each entry contains the following information:

{
     "country":"UA",
     "name":"Hurzuf",
     "_id":707860,
     "coord":{
           "lon":34.283333,
           "lat":44.549999
     }
}

Your task is to:

  • Display this of cities on a scrollable list in alphabetic order (city first, country after)
    "Denver, US" should appear before, "Sydney, Australia"
    "Anaheim, US" should appear before "Denver, US"
  • Be able to filter the results by a given prefix string, over the city.
  • Selecting a city will show a map centered on the coordinates associated with the city.
  • Optimize for fast searches, loading time of the app is not so important We define a prefix string as: a substring that matches the initial characters of the target string. For instance, assume the following entries:
Alabama, US
Albuquerque, US
Anaheim, US Arizona, US Sydney, AU

If the given prefix is 'A', all cities but Sydney should appear. Contrariwise, if the given prefix is “s”, the only result should be “Sydney, AU”. If the given prefix is “Al”, “Alabama, US” and “Albuquerque, US” are the only results. If the prefix given is “Alb” then the only result is “Albuquerque, US”

Additional requirements/restrictions:

  • The list will be provided to you as a plain text JSON format array.
  • The UI should be as responsive as possible while typing a filter.
  • The list should be updated with every character added/removed to the filter.
  • You can preprocess the list into any other representation that you consider more efficient for searches and display. Provide information of why that representation is more efficient in the comments of the code.
  • Database implementations are forbidden
  • Provide unit tests, that your search algorithm is displaying the correct results giving different inputs, including invalid inputs.
  • Alpha/beta versions of the IDE are forbidden, you must work with the stable version of the IDE
  • The code of the assignment has to be delivered along with the git repository (.git folder). We want to see the progress evolution
  • For Android: ..* Language must be Java ..* UI has to be implemented using 1 activity with multiple fragments ..* Only 3rd party libraries allowed are: GSON or Jackson. ..* Compatible with Android 4.1+
  • For iOS: ..* Language can be objc or swift 2.2 ..* Compatible with iOS 8+ ..* 3rd party libraries are forbidden.

cities's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.