All Questions
5 questions
3
votes
1
answer
96
views
Java i/o speed less than python i/o while printing an array
Motivation: I was solving an array based i/o problem and encountered Time Limit Errors, it was later found that the code for java ran roughly 10x slower than the ...
3
votes
4
answers
3k
views
Rearranging an array such that positive and negative elements are at alternate positions
We are given an array in which we have equal number of positive and negative elements.
We have to rearrange this array such that all positive and negative elements are at alternate positions and ...
4
votes
1
answer
1k
views
Repeated comparison of sorted subarrays
This question is from a recently concluded competition on Codechef.
You are given an array A of size n, and there are ...
3
votes
2
answers
1k
views
One-dimensional circular Conway's Game of Life
I have a program that is working, but it takes way too long to get the answer. With input like
15 100000000
111010111001100
The program checks for 15 numbers, ...
3
votes
4
answers
5k
views
Circular array rotation Java
I have a solution to the HackerRank Circular Array Rotation challenge. It passes 7 test cases out of 15. The rest of them are getting timed out. I think it's because of the huge data set that has ...