markhary / codility Goto Github PK
View Code? Open in Web Editor NEWMy C++ solutions to the Lessons section of Codility
License: The Unlicense
My C++ solutions to the Lessons section of Codility
License: The Unlicense
"What is the minimal impact factor of nucleotides contained in a particular part of the given DNA sequence?"
Not sure if my thinking is right, but answer is:
If we have an array of counts of size 'A'-'Z' (26) and another array where we get impacts also in 0(1) time then task can be completed in O(m) were m is length of DNA sqeuence
Hi, looks like your code gives %100 results on the codility test cases. But there is a mistake.
Let's say our input is that :
vector vec = {-2, -1, 0 , 4};
According to your code, function returns 0 because of this line :
if ( A[2] == 0 ) return A[0] * A[1] * A[2];
i think , it should be something like this
if ( A[2] == 0 ) return A[0] * A[1] * A[3];
it gives 8.
Such a test scenario may not have come across on the Codility site.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.