# Questions tagged [algorithms]

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

8,911 questions
Filter by
Sorted by
Tagged with
28 views

### Given a list of integer rectangle areas, find all integer rectangles that they can tile

Is there an efficient algorithm that takes in a list (multiset) of integer rectangle areas and finds all possible integer rectangle tilings? Every integer rectangle area in the list (multiset) must be ...
28 views

84 views

### An algorithm for effecient resource redistribution

For those who think visually, say I've got 5 warehouses with a current stock level of # of fish, and a target level for each. How do I achieve the new target levels in as few truck shipments as ...
42 views

### How difficult is this matching-like problem?

Let $A$ and $B$ be two sets of integers with $|A|>|B|$. Given a map $f: A \rightarrow B$ and $i \in A, j \in B$, let us use the shorthand "$i$ is matched to $j$" if $f(i)=j$. I am ...
24 views

### Asymptotic Notation sanity check for f(x) and g(x) [duplicate]

For each of the 2 pairs of functions I need to figure out the following: g(n) = Θ(h(n))? g(n) = O(h(n))? g(n) = Ω(h(n))? g(n) = o(h(n))? g(n) = ω(h(n))? Pair one g(n) = (64)(n/4), h(n) = 256(n/8) ...
26 views

### How to solve connecting cities problem?

This problem is from hackerrank seems to be impossible that I can't sleep without knowing the solution. The problem: There are 2 states each contain cities and roads between them. I need to remove ...
15 views

### minimum moves to be made to get out of convex hull

Given a convex hull in $XY$ plane. and we have $n$ points sitting inside it. In one move we can move all the points to right by $1$ or move all the points to up by $1$. what are the minimum number of ...
131 views

### divide a sorted array into k subarrays with their intervals are same and count integers in the interval without accessing the data

Given a positive integer k and an array A[1..n] that contains n positive integers in ascending order, count the number of integers that its value lie in $(\frac{100(i−1)}{k}, \frac{100i}{k}]$ for ...
197 views

### Polynomial time algorithm for finding a maximal monotone subset

Input: Some fixed $k>1$, vectors $x_i,y_i\in\mathbb R^k$ for $1\le i\le n$. Output: A subset $I\subset\{1,\dots,n\}$ of maximal size such that $(x_i-x_j)^T(y_i-y_j) \ge 0$ for all $i,j\in I$. ...
22 views

### Determing Big Oh Of Given Data

I'm trying to determine the big O time complexity of the following data set where the first column is the input size, and the second column is the execution time in seconds. Where possible, I should ...