Skip to content

ATDevOutreach/DuaraInternshipCodeChallengeMay2018

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Duara Internship Code Challenge - 22nd May 2018

Due: 23rd 9:00am May or Earlier

There are four tasks in this challenge, choose any of the four.
You can use any programming language and any tools from the standard library of your language of choice. The submission instructions are specified at the bottom of the challenge page.

Task 1

License Plates:

A license plate number has form ABC-123, three letters followed by three digits. You are to store the set of license plate numbers, assume you will have about a hundred thousand of them, and be able to answer queries like:

  • Is license plate PLB-123 a member of the set?
  • How many license plates begin with the letters PLB?
  • What is the list of license plates that begin with the letters PLB?
Your task is to write programs to store and query a list of license plate numbers.

Task 2

Division by repeated subtraction:

Write a function that divides two numbers and returns their quotient. Use recursive subtraction to find the quotient. The function should only take two arguments.

Task 3

Distinct Characters:

Write a program to determine if all the characters in a string are distinct. For instance, the word “Programming” has two m and two g, so all the characters are not distinct, but the word “Talking” has seven distinct characters.

Your task is to write a program to determine if all the characters in a string are distinct; you should provide three solutions, one that takes time O(n²), one that takes time O(n log n), and one that takes time O(n).

Task 4

T9:

The digits on a telephone keypad are associated with letters; for instance, the digit 2 is associated with the letters A, B and C, and the digit 7 is associated with the letters P, Q, R and S. Thus, a word can be converted to its numeric equivalent; for instance, AFRICA can be converted to the number 237422. The conversion is not necessarily unique, so ACT, BAT and CAT all convert to 228.

Your task is to write a program that takes a number, such as 228, and returns a list of all the words in a dictionary that are represented by that number. Assume that the dictionary is provided as a file with a list of valid words.
How to submit
  1. Check out the format for submitting your code here

  2. Make sure when creating a branch to use your correct phone Number, as this is what we will use to get back to you.

NB: As a branch-name you can also use your email. See you on the other side, and best of luck!

Slack

In case you have any questions, join our Slack here and join the #internship-challenge channel.

About Africa's Talking Code Challenges

Please read the overview here.

About

Duaras code challenge for may 2018

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published