Skip to content

This project describes the solution to a codility programming challenge for position of developer at Microsoft

Notifications You must be signed in to change notification settings

kiptubei/MicrosoftCode2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microsoft Codility Interview Question

This project describes the solution to a codility programming challenge for position of developer at Microsoft

Description

Given a String representation of a Binary Number N where the length of N is in the range 1-1000000000 ,two actions can be performed on N ,if its odd subtract 1 ,if even divide it by 2. Iterate this operation until N is 0.

Write an "Efficient" function:

class Solution { public int solution(String N); }

that, given a positive integer N, returns the number of operations it requires to get N to 1.

Write an efficient algorithm for the following assumptions:

N is an integer whose binary representation is of length within the range [1..10000000].

Built With

  • Java 1.8 - Programming Language and Version

Authors

  • Mark James Kiptubei - Initial work - Kiptubei

License

About

This project describes the solution to a codility programming challenge for position of developer at Microsoft

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages