Questions tagged [algorithm]

An algorithm is a sequence of well-defined steps that define an abstract solution to a problem. Use this tag when your issue is related to algorithm design.

Filter by
Sorted by
Tagged with
3
votes
3answers
43 views

Implementing range from_to with step

...
1
vote
1answer
41 views

How to make this algorithm faster. Calculates and searches through large arrays

Ive got this algoritm thats "complex". The comments in code give examples of how large the various data types could be. My cpu usage is less than 10% when running this and ram usage is good. ...
0
votes
0answers
14 views

Java GUI numbers to letters converter [closed]

I have this program, where I have java GUI and I wanted to ask if anyone would help me with a code in private class ActionRun to let user input numbers and output it's alphabetical order. For example -...
0
votes
3answers
87 views

Finding unique top sums from multiple lists

My question arises from this post on MSE where I have provided an answer to solve the question : There are multiple lists given. The number of lists is arbitrary. Each list contains numbers and is ...
0
votes
1answer
50 views

Finding all pairs of elements in an array that sum to a target value using multiple pointers (follow up)

The previous question was not clear enough so I will try to clarify it more in this follow-up question. I tried the multiple pointers technique to solve the problem that find pair of values that sums ...
2
votes
1answer
73 views

C++ Incredibly Precise Sorter | Efficiency and speed of sorting algorithms

Hey Guys, I'm in the process of building a console program in C ++ that allows users to: sort a sequence of numbers loaded from a TXT file save sorted sequence in a new TXT file measure the sorting ...
1
vote
0answers
71 views

Generating Unique Subsets using Bitmasking

Given an array arr[] of integers of size N that might contain duplicates, the task is to find all possible unique subsets. Link to the judge: LINK Note: Each subset should be sorted. Example 1: ...
1
vote
2answers
77 views

How can i reduce the time complexity further for this solution?

I was trying to attempt below given challenge. I tried multiple ways to solve the problem but none of them were good enough to pass the time limit. Please advise if you have any idea to improve on ...
1
vote
1answer
42 views

Python Prime Search Slower Optimization

I have these 2 version of code. Both are looking for all primes under a certain ceiling value. The first is testing against the set of all odd numbers. The second in testing against the set of all 6k-...
0
votes
0answers
26 views

Parallel 3D Discrete Cosine Transformation Implementation in Matlab

I am trying to implement 3D Discrete Cosine Transformation calculation in Matlab with parallel computing parfor. The formula of 3D Discrete Cosine Transformation is ...
2
votes
2answers
78 views

Parking places design

I got a question: Design a parking system. There are 3 types of parking spaces: big, medium and small. Implement ParkingSystem class(int big, int medium, int small)....
-1
votes
2answers
72 views

Finding all pairs of elements in an array that sum to a target value using multiple pointers

I was thinking about this problem where you should make a function that takes an array and a target value and then it will find all the pair values that sums up to that target value. Of course there ...
0
votes
2answers
34 views

Flattening a List containing Empty Lists

As part of a text buffer implemented as a piece table, there is an often called procedure to flatten a nested list of character lists. The function is part of constructing substrings of the buffer for ...
0
votes
2answers
129 views

Count the number of arithmetic progressions within a sequence

I have some problems with code for my classes. Even though it works correctly, I run out of time for half of the examples. Here's the task (I really did my best trying to translate it): You have a ...

15 30 50 per page
1
2 3 4 5
311