Algorithm in C# : Write a C# program to sort a array using Bubble Sort algorithm

banner_bubbles[1]

Bubble sort is one of the simplest sorting algorithm but if you ask anyone to implement on the spot it gives you an opportunity to gauge programming skills of a candidate. Let us take the array of numbers “5 1

Tagged with: ,
Posted in Algorithm, C#

Algorithm in C# : How to reverse String

hellowworld

This is one of my favorite question. Since String is one of the most important type in programming, you expect lot of question related to String any data structure interview. There are many ways to reverse Sting in C# or any other programming language, and

Tagged with: ,
Posted in Algorithm, C#

Algorithm in C# : In an integer array, there is 1 to 100 number, out of one is duplicate, how to find?

number array

This is a rather simple data structures question, especially for this kind of. In this case you can simply add all numbers stored in array, and total sum should be equal to n(n+1)/2. Now just subtract actual sum to expected sum,

Tagged with: ,
Posted in Algorithm, C#

Algorithm in C# : How to find 3rd element from end in a linked list in one pass?

ironchain

This is another frequently asked linked list interview question. This question is exactly similar to finding middle element of linked list in single pass. If we apply same trick of maintaining two pointers and increment other pointer, when first has moved upto 3rd element, than

Tagged with: ,
Posted in Algorithm, C#

Algorithm in C# : How to find if linked list has loop ?

linkedlist

This question has bit of similarity with earlier algorithm and data structure interview question. I mean we can use two pointer approach to solve this problem. If we maintain two pointers, and we increment one pointer after processing two nodes and other

Tagged with: ,
Posted in Algorithm, C#

Algorithm in C# : How to find middle element of linked list in one pass?

linkedlist

One of the most popular question from data structures and algorithm, mostly asked on telephonic interview. Since many programmer know that, in order to find length of linked list we need to first traverse through linked list till we find last

Tagged with: ,
Posted in Algorithm, C#

A Localization Approach With Json Data for .NET Application

Globalization-Localization-banner

There are two approaches in localization implement in .NET development, the traditional one is using resource file, another one is based on database. The technique of using resource to solve localization problem is very mature, it can be easily implemented by

Tagged with: ,
Posted in ASP.NET, C#

Notepad++ Keyboard Shortcuts

Notepad++6.1.1+Free+Download[1]

Tagged with:
Posted in Uncategorized

Princeton Univerisy Lectures: Algorithms Part I – Analysis of Algorithms(4) – Order-of-Growth Classifications

1

by Kevin Wayne, Robert Sedgewick Now, fortunately when we analyze algorithms, actually not too many different functions arise and actually that property allows us to really classify algorithms according to their performance as the problem size grows. So that’s what

Tagged with:
Posted in Algorithm

Princeton Univerisy Lectures: Algorithms Part I – Analysis of Algorithms(3) – Mathematical Models

1

by Kevin Wayne, Robert Sedgewick Observing what’s happening as we did in the last section it gives us a, a way to predict performance but it really doesn’t help us understand what the algorithm’s doing. So next, we’re going to

Tagged with:
Posted in Algorithm