Skip to content

vortex-so/vortex-mobile-dev-12-25

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mobile Developer Technical Assessment

Company: Vortex Position: Mobile Developer Duration: 1-2 Days


Instructions

  1. Fork this repository to your own GitHub account
  2. Make your forked repository PUBLIC
  3. Complete all three parts in the designated folders
  4. Write clean, readable code with appropriate comments
  5. Commit your work with meaningful commit messages
  6. Submit your public forked repository link to HR before the deadline

Assessment Structure

/part-1-theory        → Theory questions (answers.md)
/part-2-code-snippets → Coding tasks (Dart files)
/part-3-logic-problems → Algorithm problems (Dart files)

Part 1: Theory (Multiple Choice & Short Answer)

Open part-1-theory/answers.md and answer all questions there.

  • Section A: 10 Multiple Choice questions
  • Section B: 5 Short Answer questions

Part 2: Code Snippets

Create your solutions in part-2-code-snippets/ folder. Each solution should be in a separate Dart file.

Task 1: API Service Class (api_service.dart)

Write a class ApiService that:

  • Has a method fetchUsers() that makes a GET request to https://api.example.com/users
  • Handles loading, success, and error states
  • Returns a list of User objects
  • Includes proper error handling with try-catch

Define the User model with fields: id, name, email, isActive

Note: The API URL is a placeholder. We are evaluating your code structure, not whether it runs. Focus on demonstrating proper HTTP request patterns, error handling, and model parsing.


Task 2: Fix This Code (fix_counter.dart)

The following code has bugs. Identify and fix all issues, then explain what was wrong in comments.

class CounterScreen extends StatelessWidget {
  int counter = 0;

  void incrementCounter() {
    counter++;
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text('Counter: $counter'),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: incrementCounter(),
        child: Icon(Icons.add),
      ),
    );
  }
}

Task 3: State Management (user_provider.dart)

Using Provider (or any state management you prefer), create:

  • A UserProvider class that manages a list of users
  • Methods: addUser(), removeUser(), toggleUserActive()
  • The state should notify listeners when changed

Task 4: SQL Query (queries.sql)

Write SQL queries for the following scenarios. Assume you have these tables:

courses (id, title, category, price, instructor_id, created_at)
enrollments (id, user_id, course_id, enrolled_at, completed_at)
users (id, name, email, role, created_at)

Write queries to:

  1. Get all courses with their instructor names, ordered by newest first
  2. Find the top 5 most enrolled courses
  3. Get users who have completed more than 3 courses
  4. Calculate the total revenue per category

Task 5: Widget Implementation (search_widget.dart)

Create a SearchableList widget that:

  • Takes a list of items and displays them
  • Has a search TextField at the top
  • Filters the list in real-time as user types
  • Shows "No results found" when search has no matches
  • Debounces the search input (300ms delay)

Part 3: Logic Problems

Create your solutions in part-3-logic-problems/ folder. Each solution should be in a separate Dart file with a main() function that demonstrates the solution.

Problem 1: Course Schedule Validator (schedule_validator.dart)

An EdTech platform has courses with prerequisites. Given a total number of courses (labeled 0 to n-1) and a list of prerequisite pairs, determine if a student can complete all courses.

// Example:
// Input: numCourses = 4, prerequisites = [[1,0], [2,1], [3,2]]
// Output: true
// Explanation: Course 0 has no prereq, 1 requires 0, 2 requires 1, 3 requires 2

// Input: numCourses = 2, prerequisites = [[0,1], [1,0]]
// Output: false
// Explanation: Circular dependency - impossible to complete

Write a function:

bool canFinishAllCourses(int numCourses, List<List<int>> prerequisites)

Problem 2: Learning Path Finder (learning_path.dart)

Given a list of courses where each course has a duration (in hours) and a skill value, find the maximum skill value a student can achieve within a given time limit.

// Example:
// courses = [
//   {"name": "Flutter Basics", "duration": 5, "skill": 10},
//   {"name": "Advanced Dart", "duration": 3, "skill": 7},
//   {"name": "State Management", "duration": 4, "skill": 8},
//   {"name": "API Integration", "duration": 2, "skill": 5}
// ]
// timeLimit = 8 hours
//
// Output: 15 (Advanced Dart + State Management = 3+4 hours, 7+8 skill)

Write a function:

int maxSkillValue(List<Map<String, dynamic>> courses, int timeLimit)

Problem 3: Study Group Formation (study_groups.dart)

Students have different skill levels (1-10). Form study groups where:

  • Each group has exactly 3 students
  • The difference between max and min skill in a group should be ≤ 2
  • Maximize the number of groups formed
// Example:
// Input: skills = [1, 2, 3, 3, 4, 5, 5, 6, 7, 8]
// Output: 2
// Explanation: Group 1: [3,3,4], Group 2: [5,5,6]
// Students with skills 1,2,7,8 cannot form valid groups

Write a function:

int maxStudyGroups(List<int> skills)

Submission Checklist

Before submitting, ensure:

  • Your forked repository is PUBLIC
  • All three parts are completed
  • Code is clean and has appropriate comments
  • Commit history shows meaningful progress
  • All Dart code compiles without errors

Good luck!

If you have any questions about the assessment, please contact HR.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors