Category Archives: Misc

Miscellaneous

Look-and-Say Sequence

Find the n’th term in Look-and-say (Or Count and Say) Sequence. The look-and-say sequence is the sequence of below integers: 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, …

Working with Shared Libraries | Set 2

We have covered basic information about shared libraries in the previous post. In the current article we will learn how to create shared libraries on Linux.

Static and Dynamic Libraries | Set 1

When a C program is compiled, the compiler generates object code. After generating the object code, the compiler also invokes linker. One of the main tasks for linker is to make code of library functions (eg printf(), scanf(), sqrt(), ..etc) available to your program.

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 element is present multiple times in all the sets, it should be added that many times in the result.