Linear congruential generator is very basic algorithm to generate random numbers. Although it is a very fast algorithm, it may not generate very random variables. The formula of that generator is giv ...
Problem
Given an array. You need to sort the integers in array with selection sort. And return them in an array.
Selection sort program for selection sort to sort numbers. Selection sort algorithm ...
Problem
Culculate area of equilateral triangle. And return the area with float.(2 digits after point.)
Properties of Equilateral Triangle :
Equilateral triangle is a triangle in which all thre ...
Yavuz loves to play basketball. Also he is interested in with math and sometimes he produces
little funny mathematic games. Yavuz has written a program which finds out if number N is an
Emirp number ...
Write a recursive function that calculates product of two number with only summation.
Note: Inputs will ve ALWAYS positive numbers. You don't need to check if it is negative.
A cyclic number is an integer n digits in length which, when multiplied by any integer from 1 to n, yields a"cycle"of the digits of the original number. That is, if you consider the number after the ...
From among n people, numbered 1, 2, . . ., n, standing in circle every mth is going to be executed and only the life of the last remaining person will be saved. Joseph was smart enough to choose the ...
Given an array of numbers, the task is to find the maximum value from the string, you can add a ‘+’ or ‘*’ sign between any two numbers. You should also use parantheses.
Examples:
[0, 1, 2, 3, 1] c ...