# Questions tagged [fastest-algorithm]

Fastest-algorithm competitions are won by the answer with the smallest asymptotic time complexity. For challenges based on actual runtime, use [fastest-code] instead.

79 questions
Filter by
Sorted by
Tagged with
287 views

### Find the most isolated point

Given two non-empty sets of points $P,T = \{(x,y)\ |\ x,y \in \mathbb{Z} \}$, find the point $p \in P$ such that it is the "most isolated" from all points in $T$. The "most ...
• 9,706
289 views

### Dishonest dungeon staff

This is a joint post with https://puzzling.stackexchange.com/questions/126255/dishonest-dungeon-staff You are faced with the difficult task to set up a dungeon for adventurers. However you made a deal ...
• 151
1 vote
639 views

### How to optimize rectilinear borders

Given an $n \times n$ matrix of integers, The task is to find the optimal dividing line that maximizes the sum of the integers on the same side as the top left corner. The dividing line should be ...
• 2,936
1 vote
546 views

### Where to put a circle?

Consider an $n \times n$ grid of integers which is part of an infinite grid. The top left coordinate of the $n \times n$ grid of integers is $(0, 0)$. The task is to find a circle which when ...
• 2,936
355 views

### Optimizing polygon

For this problem you are given an $n \times n$ matrix of integers. The task is to find a pentagon in the matrix with maximum sum. The pentagon must include part (or all) of the x and y axes as two ...
• 2,936
221 views

### Smashing Dominoes [closed]

Challenge This challenge is based on the domino effect: Initially, each domino is located on one straight line and is in a vertical state. It can be dropped either to the left along the same straight ...
• 11
596 views

### Which line is best?

Consider an $n \times n$ grid of integers. The task is to draw a straight line across the grid so that the part that includes the top left corner sums to the largest number possible. Here is a ...
• 2,936
610 views

### Sum of the sum of all possible subsets raised to power k

You are given an array A of non-negative integers. You can pick any non-empty subset, S from the array A. The score of a subset S is the sum of the elements in S raised to the power of K, i.e. for a ...
• 79
1 vote
557 views

• 615
478 views

705 views

### Which number is bigger?

Define f(a,b) := a if b=1; a^f(a,b-1) if b>1 (Tetration, where ^ means power) for positive integers ...
• 24.5k
231 views

### Find the longest uninterrupted arc in N dimensions

See similar question for 2D case: Find the longest uninterrupted arc The challenge here is to find the longest uninterruped great circle arc around a unit hypersphere in N dimensions, with a random ...
• 269
519 views

### Find the longest uninterrupted arc

The challenge here is to find the longest uninterruped arc around a unit circle with a random amount of points distributed in random positions around it. Here is a diagram to assist my explanation: ...
• 269
334 views

### Fastest to find the joint

The input is an array (or space-separated string, as you wish), zero-indexed, consisting of one strictly increasing array and one strictly decreasing array (in this order, not other vice versa), each ...
• 4,811
583 views

### Remove entries from array to sort it and maximize sum of elements

This challenge is from an admission test to a closed number cyber security course. Anyway it doesn't have to do with cyber security, it's just to test the students logical and coding skills. Task ...
• 251
958 views

### Approximate floating point number with n-digit precision

We have a floating point number r between 0 and 1, and an integer p. Find the fraction of integers with the smallest ...
• 357
1k views

### remove duplicates from array [closed]

You have given an array from which we need to remove duplicates. Rules: First or immediate duplicates gets removed first. Array contains natural numbers ...
• 131