Kth Largest Element in Array

Problem Description: Given an array A[] of n elements and a positive integer K, find the Kth smallest element in the array. It is given th...

santosh 6 أبريل, 2013

Levenshtein distance (Edit distance) - C#

Learn how to implement the Levenshtein distance algorithm in C# to measure the number of changes required to transform one string into anot...

santosh 6 أبريل, 2013

Longest increasing subsequence problem (Dynamic Programming)

The input consists of two sequences ~x = x1, . . . , xn and ~y = y1, . . . , ym. The goal is to ﬁnd a longest common subsequence of ~x and...

santosh 6 أبريل, 2013

0/1 Knapsack Problem-C#

As per the Wikipedia The knapsack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a val...

santosh 6 أبريل, 2013

Generate permutations of a given string in c#

In this post, I will show you how to generate the permutations of a given string in c#. This problem is a perfect example of the recursion ...

santosh 4 أبريل, 2013

Recursive merge sort implementation in c#

In this article, I will show you the implementation of Merge Sort  the algorithm in C#. What is merge sort? Merge sort is a divide-an...

santosh 4 أبريل, 2013

Quick sort program in C# using recursion

Sorting is essential in applications to arrange the data in ascending or descending order. In this article, I will show you how to implem...

santosh 4 أبريل, 2013

How to implement selection sort in c#

In this post, I will show you how to implement selection sort in c#. Before going to implement selection sort, let’s describe how selection...

santosh 4 أبريل, 2013

C# Lambda Expression One-Liners

LINQ is a very popular feature of C#. You can write complex code in a lesser line. In this post, I will show you some one-liner Lambda e...

santosh 3 أبريل, 2013