C1 Min Read LetuscrackonJune 10, 2024 Reversed Sum of Pairs An array of N integers is passed as input. The program must print the sum of every two consecutive elements in the array from last. Boundary…
C Dynamic Programming1 Min Read LetuscrackonJune 10, 2024 Codu and Sum Love Given N number of x‘s, perform logic equivalent of the below Java code and print the output. Boundary Condition(s):1…
C Java Python TCS CodeVita2 Min Read LetuscrackonJune 10, 2024 Consecutive Prime Sum – TCS CodeVita Some prime numbers can be expressed as a sum of other consecutive prime numbers. For example 5 = 2 + 3, 17 = 2 + 3 + 5 + 7, 41 = 2 + 3 + 5 + 7…
C1 Min Read LetuscrackonJune 10, 2024 Matrix Maximum Column Sum An integer matrix of size N*N is given as input. The program must print the maximum column-wise sum of the matrix. Boundary Condition(s):1…
C1 Min Read LetuscrackonJune 10, 2024 Sum Of First and Last Alternate Elements Given an integer array of size N, print the sum of first and last number, second first and second last number and so on.Note:N is always…
C1 Min Read LetuscrackonJune 10, 2024 Sum of Dice Values Pairs of integers are passed as the input to the program. The integers in each pair represent values of two dice in a game. If both the values…
C1 Min Read LetuscrackonJune 9, 2024 Matrix Diagonals Sum You are given a square matrix of size N*N.Calculate the sum of integers present in the two main diagonals Example 1: Input:35 10 1179 6 129 21…
C1 Min Read LetuscrackonJune 9, 2024 Minimum Sum – M out of N Given N positive integers, find the minimum sum S that can be obtained by adding exactly M out of the N integers. The program must print the…
C1 Min Read LetuscrackonJune 9, 2024 2D Matrix – Elements Adjacent Sum Given a matrix of R rows and C columns, for each element print the sum of the adjacent elements.Input Format:The first line contains RThe…
C Python1 Min Read LetuscrackonJune 9, 2024 Array Element Adjacent Sum Given an Array of length N, the program must print the sum of adjacent numbers of elements present in the array.Input Format:First line…