Problem Statment: Given two Strings copy the contents of one string to another. Example 1: Input: str1=”Takeuforward”, str2=”” Output: str2=Takeuforward
Continue readingCategory: Data Structure
Transpose of a Matrix in C
Problem Statement: Given a Matrix print the transpose of a matrix. Examples: Example 1: Input: mat[][] = 1 2 3
Continue readingString Concatenation in C
Problem Statment: Given two Strings concatenate one string to another and print the result. Examples: Example 1: Input: str1=”Take”, str2=”uforward”
Continue readingLinear Search in C
Problem Statement: Given an array, and an element num the task is to find if num is present in the
Continue readingMatrix Addition in C
Problem Statement: Given two matrices add the value of the two matrices and print the resultant matrix. Example 1: Input:
Continue readingReverse String in C
Problem Statement: Given a String, reverse the string and print it. Example 1: Input: str = “Takeuforward” Output: drawrofuekat Example
Continue readingSpiral Traversal of Matrix
Problem Statement: Given a Matrix, print the given matrix in spiral order. Examples: Example 1: Input: Matrix[][] = { {
Continue readingPrefix Sum Technique
In an array of integers n, the prefix sum array is the array whose every element is the sum of
Continue readingKMP Algorithm
Problem Statement: Implement the Knuth-Morris-Pratt KMP string matching algorithm. Examples: Example 1: Input: String = ”aaaaaaaamaaaaaab” and Pattern = “aaaaaab”
Continue readingCount digits in a number
Problem Statement: Given an integer N , write program to count number of digits in N. Examples: Example 1: Input:
Continue reading