# Competitive Programming

## Dutch National Flag Problem

In this article, we will look into an interesting problem asked in many coding interviews related to arrays: Dutch National Flag Problem. We will discuss the problem, the intuition behind it, and the application of the algorithm in certain scenarios. Along with this we will look at different approaches to solve the problem and analyze …

## Find kth Smallest and Largest Element in an Array in C++

Hello everyone, in this post we are going to go through a very popular and recently asked coding question.  Finding the kth smallest and largest element in an array. From the problem statement, it is clear that the main task is to find the kth smallest or largest element in an unsorted array.  You cannot …

## Count Trailing Zeros in Factorial of Number

Here you will learn about how to count trailing zeros in factorial of number. One simple approach to count trailing zeros is first find factorial of number and then count the zeros in the factorial one by one. It is fine for smaller number like 10. 10! = 3628800 So, trailing zeros = 2 But …

## Factorial of Large Number in C and C++

Here you will get program to find factorial of large number in C and C++. Factorial of big numbers contain so many digits. For example factorial of 100 has almost 158 digits. So there is no data type available to store such a long value. But we can find factorial for large numbers using simple …