Convert number to word
Write a program to convert number to word For example:467Four hundred sixty seven 2321Two thousand three hundred twenty one Solution: Continue reading Convert number to word
Write a program to convert number to word For example:467Four hundred sixty seven 2321Two thousand three hundred twenty one Solution: Continue reading Convert number to word
Write a Program to display the upper triangular matrix For example Solution: Continue reading Upper triangular matrix
Write a Program to compute the sum of row and each column of a matrix For example: Solution Continue reading Sum of row and column of a matrix
Write a Program to find the transpose a matrix For example Solution: Continue reading Transpose of a matrix
Write a program to calculate addition of two given matrix For example Solution: Continue reading Addition of Matrix
write a program to rotate array elements to left by the specified number of times. For example Solution: Continue reading Rotate array elements to left
Write a program to get unique value from two array? For Example: Solution: Continue reading Get Common value from two array
Write a program to get unique value from two array. For Example: Solution: Continue reading Get Unique value from two array
Write a program to Find Second Highest element in an array. For example: Solution: Continue reading Second Highest element in an array
Write a program to Reverse an Array Elements without using In-build function. For example: Solution: Continue reading Reverse an Array Elements:
Write a program to Move 0’s to end of arrayFor example: Solution: Continue reading Move 0’s to end of array
Given an array of integer numbers, write a program to find the length of the longest alternating sub array from the given array. For example: Solution: Continue reading Length of the longest alternating sub array
Given an integer array with sequential number write a program to find the missing number from given array. Solution: Continue reading Find Missing number in sequential array
Generate a Binary Triangle from the given number. Binary Triangle is a Triangle formed with 1’s and 0’s. The number of rows in the binary triangle is user input. example: 5 Rows Binary Triangle Solution: Continue reading Binary Triangle
Given an array write C# program to find the sum of all the possible sub-arrays. For.e.g. int [] a = {4, 2, 1}; Output: Possible subarrays – {4}, {2}, {1}, {4, 2}, {2, 1}, {4, 2, 1} So, sum = 4+ 2+ 1 + 6 + 3 + 7 = 23 Solution Brute force approach Problem with below program is iterating over all pairs of … Continue reading Sum of all sub arrays in O(n) Time
Problem Write a C# programme to sum provided number digit using? For e.g. Input 123 Output 6 Solution Continue reading Recursion to Sum number’s Digit
Problem A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. Given an array of stones (non-negative integers) where each element in the array represents the maximum number of positions one can move forward from that element. Write a program to Find the minimum number of jumps required to cross … Continue reading Frog Jump Problem
Question: Find all possible subarray from given array Given an array of positive integers, Write an C# Program to find all sub arrays from an array. Answer: Subarray of an array a is a[i..j] where 0 <= i <= j < n where n is length of array. Continue reading Find all sub-array from array
Question: Given a prime number n and mod k number find out whether provided prime number n is having a primitive root mod k Answer A primitive root mod n is an integer g such that every integer relatively prime to n is congruent to a power of g mod n. That is, the integer g is a primitive root (mod n) if for every number a relatively prime to n there is an integer z such that a = (gz (mod n)) for example: 2 is a primitive root mod 5, because for … Continue reading Primitive Root
Question Given an array of unsorted array and a number, determines all pair in array in array whose sum is equivalent to the given number For example: from provided Array “arr” find all Pair who sum is 4 Answer: Logic: Get the difference between array elements and given sum number Find the difference in reaming array to get the pairs Continue reading Find Pair of sum in Array.
Question: Write a C# program to convert any decimal number (base-10 (0 to 9)) into binary number (base-2 (0 or 1))? Answer: Decimal Number – Decimal number is a base 10 number because it ranges from 0 to 9, there are total 10 digits between 0 to 9. Any combination of digits is decimal number such as 223, 585, 192, 0, 7 etc. Binary … Continue reading Convert Decimal to Binary (base -2)