Problem Statment: Given two Strings copy the contents of one string to another. Example 1: Input: str1=”Takeuforward”, str2=”” Output: str2=Takeuforward

Continue reading# Category: 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 reading## String 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 reading## Linear Search in C

Problem Statement: Given an array, and an element num the task is to find if num is present in the

Continue reading## Matrix Addition in C

Problem Statement: Given two matrices add the value of the two matrices and print the resultant matrix. Example 1: Input:

Continue reading## Reverse String in C

Problem Statement: Given a String, reverse the string and print it. Example 1: Input: str = “Takeuforward” Output: drawrofuekat Example

Continue reading## Spiral Traversal of Matrix

Problem Statement: Given a Matrix, print the given matrix in spiral order. Examples: Example 1: Input: Matrix[][] = { {

Continue reading## Prefix Sum Technique

In an array of integers n, the prefix sum array is the array whose every element is the sum of

Continue reading## KMP Algorithm

Problem Statement: Implement the Knuth-Morris-Pratt KMP string matching algorithm. Examples: Example 1: Input: String = ”aaaaaaaamaaaaaab” and Pattern = “aaaaaab”

Continue reading## Count 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