Intersection of n sets
Given n sets of integers of different sizes. Each set may contain duplicates also. How to find the intersection of all the sets. If an… Read More »
Given n sets of integers of different sizes. Each set may contain duplicates also. How to find the intersection of all the sets. If an… Read More »
Given a 2D matrix, print all elements of the given matrix in diagonal order. For example, consider the following 5 X 4 input matrix. 1… Read More »
Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with… Read More »
Given a string, find the length of the longest substring without repeating characters. For example, the longest substrings without repeating characters for “ABDEFGABEF” are “BDEFGA”… Read More »
Question 1 Predict the output of the following program. What does the following fun() do in general? filter_none edit close play_arrow link brightness_4 code #include… Read More »
Question 1 Consider the following recursive C function. Let len be the length of the string s and num be the number of characters printed… Read More »
Question 1 Predict the output of following program. What does the following fun() do in general? filter_none edit close play_arrow link brightness_4 code #include<stdio.h> … Read More »
Object Oriented Programming paradigm deals with centralizing data and associated behaviours in a single entity. The entities will communicate by message passing. The high level… Read More »
There are posts on representation of floating point format. The objective of this article is to provide a brief introduction to floating point format. The… Read More »
While working with binary files, how do you measure their endianness? For example, if a programmer is making configuration file in binary format (e.g. on… Read More »
Recursion: In programming terms a recursive function can be defined as a routine that calls itself directly or indirectly. Using recursive algorithm, certain problems can… Read More »
Question 1 Predict the output of following program. filter_none edit close play_arrow link brightness_4 code #include<stdio.h> void fun(int x) { if(x > 0) { fun(–x);… Read More »
Explain the functionality of below recursive functions. Question 1 filter_none edit close play_arrow link brightness_4 code void fun1(int n) { int i = 0; if… Read More »
Explain the functionality of following functions. Question 1 filter_none edit close play_arrow link brightness_4 code /* Assume that n is greater than or equal to… Read More »
Explain the functionality of following functions. Question 1 filter_none edit close play_arrow link brightness_4 code int fun1(int x, int y) { if(x == 0) return… Read More »