In the Algorithms 1 course at Ariel University we study a number of algorithms. this project brings all the implementations of this course.
The problem Alice and Bob represent a problem where two players play a guessing game in which they have to toss a coin and guess what came out of the toss to the other player, this algorithm brings all the possibilities for the success of the game.
In this algorithm I bring all the good and least good options to find minimum and maximum in the array.
In this problem I bring an algorithm for counting cars in a circular parking lot when we do not know where we started the count.
In this algorithm we check whether a particular list is circular or not.
In this algorithm we check if a particular list has a non-circular start and a circular end.
This class gives some examples of functions realized by recursion or loop, and their priority.
This class represents the problem of numbers game, where players are given an even array of numbers and in each turn they can take either the outer left or the outer right, the winner is the one whose sum of numbers is the largest.
This algorithm is divided into two parts:
- Algorithm for solving a median problem in which the user receives an array and has to return an organ larger than the median.
- An algorithm for solving the median problem in which the user receives two sorted arrays and must return an array with all the larger safflowers from the common median to the two combined arrays.
This department represents the problem of the secretary, the problem is: a certain office gives service to n clients, the purpose of the secretary is to reduce as much as possible the average time that the clients are in the office. We see that the average time is smaller when the other adjacent treatment times are in ascending order.
This class presents an algorithm for solving the pizza problem. The pizza problem: Two brothers ordered a family pizza, one brother eating X times faster than the other brother eating. The two must not reach the last triangle at the same time, this algorithm offers the optimal pizza distribution.
This class represents an algorithm for solving the LCS problem - finding the largest common string (order is important, sequences are not important).
This class represents an algorithm for solving the LIS problem - finding the longest rising sub-series (order is important, sequences are not important).
This class represents the problem of the plane, the plane must reach from point (0,0) to point (m, n) at the minimum cost, while the rest of the plane is allowed to move down and to the right.
This class represents the solution to the prisoners' problem, if the light is on and if not.
This class represents the way to solve Fibonacci problem with complexity of O(log n).
This class represents the way to compute a power with complexity of O(log n).
This class represents the problem of donuts, how long does it take to cook many donuts on one pan with a certain capacity