All Questions
Tagged with algorithm-analysis java
6 questions
1
vote
0
answers
209
views
Rectangle packing / Bin packing with multiple frames
I have multiple rectangular frames, with different fixed heights. The width should be minimized and there is a maximum width. Then there are many different smaller rectangles. These should be packed ...
2
votes
1
answer
2k
views
Do we include output space in space complexity?
For example. I have a function which generates an array with random numbers.
int[] generateNum(int n) {
int[] result = new int[n];
/* Logic to generate random number */
...............
...
3
votes
1
answer
549
views
Algorithms comparison and complexity
I want to sole this problem:
Write a method to return all valid combinations of n-pairs of
parentheses.
The method should return an ArrayList of strings, in which each string
represents a ...
1
vote
2
answers
361
views
What is the algorithmic time complexity of this program?
I wrote a simple program in java to create and maintain Dynamic Arrays:
public class DynamicArrays {
private Integer[] input = new Integer[1];
private Integer length = 0;
private Integer ...
0
votes
1
answer
2k
views
Shortest path to visit all nodes [duplicate]
I am given a set of tourist attractions(nodes identified by x, y) and i need to find the shortest path to visit them.
The way i thought of it, is i will ignore if there are streets available and ...
2
votes
2
answers
11k
views
calculate complexity of LinkedHashSet
I have an ArrayList<LinkedHashSet<String>> setOfStrings for example this arraylist internally is composed like:
positionX[hello,car,three,hotel,beach]
positionY[.....]
...
I want to find ...