Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
274 views

Array rotation in C++

I am completely new to data structures and algorithms. I tried this problem on hackerank. I got the desired output but my code wasn't efficient enough to execute in the given time limit. How can I ...
Samir's user avatar
  • 153
2 votes
1 answer
1k views

Codewars: Pick peaks

Pick peaks Wrote my "hello world" on Thursday, so definitely a beginner. I know some Python, so not a novice to programming in general. Question For example, the array ...
Tobi Alafin's user avatar
  • 1,792
6 votes
2 answers
3k views

Find the largest sum of any slice inside an array

This is the 26th exercise I solved from Codility. It scores 100%. I think I improved a lot since I started with this lessons, around 2 months ago, but still every post I made had things to be improved....
newbie's user avatar
  • 889
3 votes
1 answer
704 views

Count the number of leaders in both sides (slices) of an array in C#. Codility EquiLeaders task

EquiLeader A non-empty array A consisting of N integers is given. The leader of this array is the value that occurs in more than half of the elements of A. An equi leader is an ...
newbie's user avatar
  • 889
2 votes
1 answer
1k views

Codility's GenomicRangeQuery solution in C#

I've been learning C# for a few months now, and I've done some basic things in java last year. I made a solution for the problem the title states, this is the task description. Task description ...
newbie's user avatar
  • 889
2 votes
1 answer
782 views

Codility's count passing cars in opposite directions in C#

I programmed a few things in java and now I'm learning C#. I've been doing exercises from Codility. The first 3 or 4 were very difficult to me but now I guess I've got the hang of it. This site ...
newbie's user avatar
  • 889
5 votes
2 answers
2k views

MaxCounters solution in C# from Codility

I programmed a little in java a while back, and now I'm learning C#.This is the first exercise of "medium" or "respectable" difficulty according to Codility, so I'm pretty pleased of finding out that ...
newbie's user avatar
  • 889
11 votes
1 answer
2k views

Earliest time frog can jump to the other side of a river in C#

I'm new to C#, I programmed a little in Java in the past. I had the two previous exercises reviewed here (permCheck, cyclicRotation, with a 100% score, just like this one), and I'm applying what the ...
newbie's user avatar
  • 889
6 votes
2 answers
2k views

Codility's Permutation Check in C#

I've made a few things in Java, and now I'm learning C#. The code passes the tests with 100% final score. I want to know what things can be improved in my code. Task description A non-empty array ...
newbie's user avatar
  • 889
5 votes
1 answer
6k views

(Codewars) Range Extraction

Kata: https://www.codewars.com/kata/range-extraction/python A format for expressing an ordered list of integers is to use a comma separated list of either individual integers or a range ...
Tobi Alafin's user avatar
  • 1,792
7 votes
1 answer
1k views

Calculating the number of rooms in a 2D house

I stumbled upon this problem on cses.fi (a problem set for the Finnish Olympiad in Informatics. This problem is in finnish so I'll translate it). I'll describe the problem, present the code and think ...
Kurns's user avatar
  • 175
8 votes
1 answer
7k views

Rearrange list by modifying the original list, put even-index values at front

I am relatively new to python and I am still trying to learn the basics of the language. I stumbled upon a question which asks you to rearrange the list by modifying the original. What you are ...
Nauman Shahid's user avatar
0 votes
2 answers
207 views

Verifying if two numbers are equal using ArrayLists

I have some question about the code below. It works correctly, but: Is there a better/another way to solve the exercise (as an expert would have done:) or mine it's perfectly done? Also, I don't see ...
I likeThatMeow's user avatar
2 votes
3 answers
307 views

CodeAbbey #21 Array Counters

I'm trying to learn some Haskell by working my way through the CodeAbbey problems. I really struggled to find a nice functional (but still efficient) way to solve problem #21: Array Counters. The ...
Mangara's user avatar
  • 475
1 vote
1 answer
3k views

Converting string elements of an array to upper and lower case, maintaining names of keys

I'm just going through some array exercises in PHP on w3resource. I have just completed: Sample array : ...
alanbuchanan's user avatar
  • 1,312

15 30 50 per page