Write a C program to find whether the given two arrays are disjoint set or not. We call two arrays disjoint set when they have no common elements between them. For checking this, we’ll first require the number of elements in the two arrays and the data values or elements in the two arrays as input. Our expected output as ...
Read More »C Program Merge Two Sorted Arrays – 3 Ways | C Programs
The problem statement here is, to write a C program to merge two sorted array in sorted order. To implement this, we’ll require the number of elements or sizes of the the two arrays along with the array elements in sorted order as our input. The desired output in the end is a single array which is the combination of ...
Read More »C Program : Convert An Array Into a Zig-Zag Fashion
The given problem statement is, to write a C program to convert the array into zig-zag fashion i.e., converting it in the form where a<b>c<d>e<f. The input requirement for this is the number of elements (or size) in the array along with the data values or elements of the array. Our desired resultant output is an array converted into zig-zag ...
Read More »C Program : Find Missing Elements of a Range – 2 Ways | C Programs
Write a C program to find the missing elements of a given range. For this, the set of inputs necessary are, size of an array or number of elements in the array along with the elements or data values of the array. We also need the start and end range as input based on which we’ll compare with the array ...
Read More »C Program Transpose of a Matrix 2 Ways | C Programs
C program to find the transpose of a given matrix. Transpose of a matrix is nothing but flipping the matrix via its diagonal such that, the rows and columns of the matrix are switched i.e., a[i][j] becomes a[j][i] and vice versa. To implement this, we require an input matrix (2D array) whose transpose matrix is to be found along with ...
Read More »C program : Find Median of Two Sorted Arrays | C Programs
Write a C program to find the median of the given two sorted arrays. Median is the middle number when the numbers are sorted in either ascending or descending order. To implement this, our required inputs are the sizes of two arrays along with the elements or data values of the two arrays. Our desired output is the double type ...
Read More »Java Program To Find Perimeter Of Rectangle | 3 Ways
Java program to find the perimeter of a rectangle – In this distinct article, we will discuss the multiple methods used to calculate the perimeter of a rectangle in Java programming. Suitable examples and sample outputs are included in this piece as well for better interpretation. The compiler has also been added so that you can execute it yourself pretty ...
Read More »C Program Patterns of 0(1+)0 in The Given String | C Programs
Write a C program to find the number of patterns formed of 0(1+)0 in the given string. For example, 010, 0110, 01110, etc. To implement this, the input necessary is a string on which the number of 0(1+)0 patterns formed is to be calculated. Our desired output is an integer number denoting the number of such patterns formed on the ...
Read More »C Program : Rotate the Matrix by K Times | C Porgrams
Write a C program to rotate the given square matrix by k times. To implement this, we require the size of square matrix along with the elements or data values of the square matrix. The desire output is also a matrix of 2D array after rotating the input array k times, Rotate matrix by 90 degrees clockwise The first step ...
Read More »C Program : Non-Repeating Elements of An Array | C Programs
The problem statement given is, to write a C program to display the non-repeating elements in a given array. To find the non-repeating characters, we require the number of elements in the array and the data values or elements of the array as inputs. Our desired output at the end is for all the non-repeating elements in this array to ...
Read More »