GithubHelp home page GithubHelp logo

interviewbit's People

Contributors

shreya367 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

interviewbit's Issues

Longest Arithmetic Progression

Hey, just check once the Question mentioned is for any array and not a sorted one, we just cannot sort the array as there will be a loss of information, let's say I have an array {3,9,6} its value will be 2 but when you sort it'll be 3.

Nobel Integer

If all the elements are negative except one and that it 0 it returns -1 instead of 1

getting interviewbit solutions

Hi, can you tell me how you downloaded your solutions from Interviewbit? Did you scrape the website or use any automated method to get your solutions?

Error in Max Non- Negative SubArray

Hi,
I copied approximately same code as yours in C. But it is not giving output. Please can you help in finding the problem.

int* maxset(int* A, int n1, int *len1) {
int i=0, maxm =0, count =0, start =0, end =-1, fstart=-1, fend=-1;
long long int sum =0, maxsum=0;
//make a array as well
while (i<n1) {
if (A[i] >= 0) {
sum = sum+A[i];
count++;
end++;
}
if (sum > maxsum) {
maxsum = sum;
fstart = start;
fend = end;
}
else if (sum==maxsum && count>maxm){
maxm = count;
fstart = start;
fend = end;
}
if (A[i] < 0){
count =0;
start = i+1;
end = i;
sum =0;
}
i++;
}
if (fstart != -1 && fend != -1){
int res[fend-fstart];
res[0] = 0;
for (i=fstart;i<fend;i++){
// res[i] = A[i];
}
return res;
}
return -1;
}

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.