cells arranged in a straight line where each day every cell 1) There is a colony of 8 cells competes with its adjacent cells(neighbour). Each day, for each cell, if its neighbours n eighbours are both active or both inactive, the cell becomes inactive the next day,. otherwise itbecomes active the next n ext day. day. ssumptions! The two cells on the ends have single adjacent cell, cell, so the other adjacent cell cell can be assumsed to be always inactive. Even after updating the cell state. consider its pervious state for updating the state of other cells. "pdate the cell informationof allcells simultaneously. simultaneously. #rite a fuction cell$ompete which ta%es ta%es one 8 element array of integers cells representing the current state of 8 cells and one integer days representing te number of days to simulate. n integer value of & represents an active cell and value of ' represents an inactive cell. program: int cell$ompete(int cells,int days) **write your code here + **function signature ends TESTCASES 1: INPUT: &,',',',',&,','-,& EXPECTED RETURN VALUE: ',&,',',&,',&,'TESTCASE 2: INPUT: &,&,&,',&,&,&,&,-, EXPECTED RETURN VALUE: ',',',',',&,&,'/rogram! int cell$ompete(int cells,int days) int temp&'-,i,j0 temp'-1temp2-1'0 for(i1'0i3days0i44) for(j1'0j380j44) tempj4&-1cellsj-0 + for(j1'0j380j44) cellsj-1tempj-5tempj4-0 + return cells0 +
2) The 6east7ecently7"sed(6") cache algorithm exists the element from the cache(when it9s full) that was least7recently7used. fter an element is re:uested from the cache, it should be added to the cache(if not already there) and considered the most7recently7used element in the cache. ;iven the maximum sicache>sicache>si
int lrucountmiss(int max>cache>sicache>sicache>sicache>si
+ if(found11&) d1bj-0 for(%1j0%3max>cache>sicache>si
@) #rite a function to insert an integer into a circular lin%ed >list whose elements are sorted in ascending order 2smallest to largest). The input to the function insertCorted6ist is a pointer start to some node in the circular list and an integer n between ' and &''. eturn a pointer to the newly inserted node. The structure to follow for a node of the circular lin%ed list is> Ctruct $Dode 0 Typedef struct $Dode cnode0 Ctruct $Dode =nt value0 $node next0 +0 $node insertCorted6ist (cnode start,int n **#=TE F" $FGE HEE + **I"D$T=FD C=;DT"E EDGC Test$ase &! =nput! @7JA7JK7J&7J7J5-,? Expected eturn Lalue! ?7JK7J&7J7J@7JA7J5 Test$ase ! =nput!
&7J7J@7JA7J?7J5-,' Expected eturn Lalue! '7J&7J7J@7JA7J?7J5A) system that can run multiple concurrent jobs on a single $/" have a process of choosing which tas% hast to run when, and how to brea% them up, called MschedulingN. The ound7obin policy for scheduling runs each job for a Oxed amount of time before switching to the next job. The waiting time fora job is the total time that it spends waiting to be run. Each job arrives at particular time for scheduling and certain time to run, when a new job arrives, =t is scheduled after existing jobs already waiting for $/" time ;iven list of job submission, calculate the average waiting time for all jobs using ound7obin policy. The input to the function waitingTimeobin consist of two integer arrays containing job arrival and run times, an integer n representing number of jobs and am integer : representing the Oxed amount of time used by ound7obin policy. The list of job arrival time and run time sorted in ascending order by arrival time. Ior jobs arriving at same time, process them in the order they are found in the arrival array. ou can assume that jobs arrive in such a way that $/" is never idle. The function should return Poating point value for the average waiting time which is calculated using round robin policy. ssume '31jobs arrival time 3 &'' and '3job run time 3&''. Poat waitingTimeobin(int arrival, int run, int n, int :) + ?) /roblem! Boosha% the mouse has been placed in a ma
$ase &! =nput!&,&,&,-2,&,&-,',&,'-Expected return value !& Explanation! The piece of cheese is placed at(&,') on the grid Boosha% can move from (',') to (&,') to reach it or can move from (',') to (',&) to (&,&) to (&,') Test case ! =nput! ',','-,2,&,&-,',&,&-Expected return value!' Explanation! Boosha% cannot move anywhere as there exists a wall right on (',') $ode! ($ 6anguage) **include header Oles needed by your program ** some libray functionality may be restricted ** deOne any function needed ** fucion signature begins, this function is re:uired =nt is/ath(int grid,int m,int n) ** write your code here + **function signature ends Rava $ode! **import librays pac%ages needed by your program ** some clases with in a pac%age may be restricted **deOne any class and method needed **class begins ,this class is re:uired /ublic class Ba
return ColveBa
if (solveBa