Moving packages on a grid to accommodate additional packages
The Problem
Moving packages on a grid to accommodate additional packages
The Problem
Can you strip a matrix in O(n^2) time?
I have an n by n binary matrix and three operations. I can zero out a row or column that has exactly one solitary one in it and I can zero out a row if it has an exact copy. How can I apply these operations repeatedly until none of them can be applied in O(n^2) time?
Mapping a list of ranges, over a list of ranked values
Problem:
What is the most efficient algorithm for solving this problem, ideally running in linear time O(n) or close to it?
I need to find the length of the longest repeating pattern in a sequence of beads represented as a string. The string can be up to 1 million characters long. What is the most efficient algorithm for solving this problem, ideally running in linear time O(n) or close to it?
What is Algorithm?
An algorithm is a step-by-step set of instructions designed to perform a specific task or solve a particular problem. It is a fundamental concept in computer science and mathematics, used to guide computers and humans in problem-solving and decision-making processes.
give me some more information
Algorithm to calculate number of buckets of different sizes required to minimise wastage
I am currently working on a problem at work where we have paint buckets of different sizes and we need to create a calculator that given a required quantity of paint it will calculate the required quantity of each bucket size minimising wastage. It needs to use the biggest size possible but minimising wastage. I am sure this sort of algorithm has a name but I can’t find it. I found the Knapsack Algorithm and the Coin Change Algorithm but they are not exactly the same.
Any idea about the name of this algorithm? It seems a fairly generic problem. I am sure an algorithm exists already.
Algorithm to get prev/next date in the interval
(examples are in zig, but I guess this is a general noob algorithmic question)
How to Write a recurrence relationship for the algorithm described
(b) An algorithm process an array of size n in two parts, A and B of equal size. Part A is processed recursively, one element at a time, until a single element remains. Part B is processed recursively by dividing it into three equal parts until it is no longer divisible.
(i) Write a recurrence relationship for the algorithm described above.
(ii) Solve the recurrence relation using the substitution method. Clearly show the steps in the computation.
Algorithms the comparsion of function
I’m learning algorithms from abdul bari videos and I’m confused about something in the context of function comparsion if f(n) = 3n^(√n) and g(n) = 2^((√n)log(n))