Cerinta completa We define a magic square to be an matrix of distinct positive integers from to where the sum of any row, column, or diagonal of length is always equal to the same number: the magic constant. You will
Find the Median
Cerinta completa The median of a list of numbers is essentially its middle element after sorting. The same number of elements occur after it as before. Given a list of numbers with an odd number of elements, find the median?
Flipping the Matrix
Cerinta completa Sean invented a game involving a matrix where each cell of the matrix contains an integer. He can reverse any of its rows or columns any number of times. The goal of the game is to maximize the
Find Digits
Cerinta completa An integer is a divisor of an integer if the remainder of . Given an integer, for each digit that makes up the integer determine whether it is a divisor. Count the number of divisors occurring within the
Fibonacci Modified
Cerinta completa Implement a modified Fibonacci sequence using the following definition: Given terms and where , term is computed as: Given three integers, , , and , compute and print the term of a modified Fibonacci sequence. Example Return .
Flatland Space Stations
Cerinta completa Flatland is a country with a number of cities, some of which have space stations. Cities are numbered consecutively and each has a road of length connecting it to the next city. It is not a circular route,
Far Vertices
Cerinta completa You are given a tree that has N vertices and N-1 edges. Your task is to mark as small number of vertices as possible, such that, the maximum distance between two unmarked vertices is less than or equal
Find the Path
Cerinta completa You are given a table, , with rows and columns. The top-left corner of the table has coordinates , and the bottom-right corner has coordinates . The cell contains integer . A path in the table is a
Find Strings
Cerinta completa A substring is defined as a contiguous sequence of one or more characters in the string. More information on substrings can be found here. You are given n strings w[1], w[2], ……, w[n]. Let S[i] denote the set
Fair Rations
Cerinta completa You are the benevolent ruler of Rankhacker Castle, and today you’re distributing bread. Your subjects are in a line, and some of them already have some loaves. Times are hard and your castle’s food stocks are dwindling, so
