Code Monkey home page Code Monkey logo

geekness-virus-challenge-csharp's Introduction

CPMX7 Geekness Virus Challenge

Given a population of patients, determine the percentage of the population that is infected of the Geekness Virus. You will receive a list of files that contains patients DNA. Each DNA is in the form of a String composed of a sequence of characters A, C, G, T.

To determine if a patient is infected, the number of occurrences of โ€‹Tโ€‹ in their DNA needs to be greater than the number of all the other letters.

Example 1

In the sequence TTTAACCGG, we can determine that the patient is infected because:

Ocurrences of A: 2 Ocurrences of C: 2 Ocurrences of G: 2 Ocurrences of T: 3 T is the dominant letter in the sequence, therefore the patient is infected.

Example 2

In the sequence TTCCGGAA, we can determine that the patient is healthy because:

Ocurrences of A: 2 Ocurrences of C: 2 Ocurrences of G: 2 Ocurrences of T: 2 T is not the dominant letter, therefore the patient is not infected.

Game rules

Write a program that calculates the percentage of the population that is infected. sicknessPercentage = number of infected patients / number of patients The sicknessPercentage should be an integer value from 0 to 100. Round the percentage value down to make it an integer (i.e. 66.66 should be rounded to 66). Each patient's DNA will be in the form of text file that your code needs to download from a URL. The faster your program finds the solution, the better score you will get.

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.