πŸ₯ž backlog

Module-Decomposition πŸ”—  

01 Read about technical interviews πŸ”— Clone

01 Read about technical interviews πŸ”—

Coursework content

Read https://sdc.codeyourfuture.io/guides/employability/interview/technical-interview-prep/

Estimated time in hours

1

What is the purpose of this assignment?

When applying for software jobs, you will probably need to do technical interviews. You need to prepare for these, and we will have a workshop in class practicing them.

  • πŸ• Priority Mandatory
  • πŸ‡ Size Small
  • πŸ“… Sprint 4
  • πŸ”‘ Priority Key
  • πŸ”‘ Priority Key
  • πŸ“… Sprint 4
  • πŸ‡ Size Small
  • πŸ• Priority Mandatory
02 Prepare for technical interview πŸ”— Clone

02 Prepare for technical interview πŸ”—

Estimated time in hours

3

What is the purpose of this assignment?

When applying for software jobs, you will probably need to do technical interviews. This will help you to prepare.

Coursework content

To prepare for this, we will be doing a technical interview workshop in class. You will be interviewing someone, and they will be interviewing you.

To prepare you need to:

  1. Read the workshop in the day plan.
  2. Work out who your partner will be. The whole class should get randomly paired up. If there’s an odd number, have a volunteer pair up with someone.
  3. Find out from your partner if they have already solved any of the exercises. From the exercises they have not solved, you should pick one (and don’t tell them what it is).
  4. Follow the “Preparing to interview someone” instructions in the workshop.

You must do this before class.

  • πŸ• Priority Mandatory
  • πŸ‚ Size Medium
  • πŸ“… Sprint 4
  • πŸ”‘ Priority Key
  • πŸ”‘ Priority Key
  • πŸ“… Sprint 4
  • πŸ‚ Size Medium
  • πŸ• Priority Mandatory
03 Prep Exercises πŸ”— Clone

03 Prep Exercises πŸ”—

https://sdc.codeyourfuture.io/decomposition/sprints/4/prep/

Why are we doing this?

Read the prep and do all of the exercises in it.

Maximum time in hours

5

How to submit

Submit a pull request to this repo from your fork, containing a single Python file per exercise.

  • πŸ• Priority Mandatory
  • πŸ“… Sprint 4
  • πŸ¦‘ Size Large
  • πŸ¦‘ Size Large
  • πŸ“… Sprint 4
  • πŸ• Priority Mandatory
04 Implement laptop allocation πŸ”— Clone

04 Implement laptop allocation πŸ”—

In the prep, there was an exercise around finding possible laptops for a group of people.

Your exercise is to extend this to actually allocate laptops to the people.

Given these class definitions:

from dataclasses import dataclass
from enum import Enum
from typing import List

class OperatingSystem(Enum):
    MACOS = "macOS"
    ARCH = "Arch Linux"
    UBUNTU = "Ubuntu"

@dataclass(frozen=True)
class Person:
    name: str
    age: int
    # Sorted in order of preference, most preferred is first.
    preferred_operating_system: List[OperatingSystem]


@dataclass(frozen=True)
class Laptop:
    id: int
    manufacturer: str
    model: str
    screen_size_in_inches: float
    operating_system: OperatingSystem

Write a function with this signature:

def allocate_laptops(people: List[Person], laptops: List[Laptop]) -> Dict[Person, Laptop]:

Every person should be allocated exactly one laptop.

If we define “sadness” as the number of places down in someone’s ranking the operating system the ended up with (i.e. if your preferences were [UBUNTU, ARCH, MACOS] and you were allocated a MACOS machine your sadness would be 2), we want to minimise the total sadness of all people. If we allocate someone a laptop with an operating system not in their preferred list, treat them as having a sadness of 100.

Maximum time in hours

3

How to submit

Submit a PR to this repo containing your function (and any supporting code).

  • πŸ• Priority Mandatory
  • πŸ‚ Size Medium
  • πŸ“… Sprint 4
  • πŸ“… Sprint 4
  • πŸ‚ Size Medium
  • πŸ• Priority Mandatory