Rotating a line in C#

May 26, 10 Rotating a line in C#

Posted by in Algorithmics, Programming

Recently I had a problem that required me to do a rotation of a line keeping the original point fixed. A rotation is a movement of an object in a circular motion, mathematically a rotation is a rigid body movement which, unlike a translation, keeps a point fixed. public partial class Rotate : Form { public Bitmap...

read more

Using the params modifier in C#

Mar 25, 10 Using the params modifier in C#

Posted by in Algorithmics, Programming

One of the most useful modifiers offered by C# is the params modifier.It is extremely useful when you do not know the number of arguments you will be passing to your method or you want to pass a variable number of arguments.Now let’s take 2 examples using the params modifier. Finding the Min and Max value from an array of...

read more

Insertion Sort

Dec 25, 09 Insertion Sort

Posted by in Algorithmics, Programming

About Insertion sort is a sorting algorithm, that compares the entries of an array/list and builts its entries one at a time.It is a good algorithm for sorting a small number of elements.It is often compared to the process of sorting a deck of cards.Let’s see how it works. The Sorting Problem We have a sequence of n...

read more

Recursive Functions

Nov 22, 09 Recursive Functions

Posted by in Algorithmics, Programming

A function that calls itself repeatedly, satisfying some condition is called a Recursive Function. Using recursion, we split a complex problem into its single simplest case. The recursive function only knows how to solve that simplest case. Each call to the recursive function should get us closer to the known simplest...

read more

Determining an Algorithm’s Complexity

Aug 03, 09 Determining an Algorithm’s Complexity

Posted by in Algorithmics, Programming

Through complexity we understand the power needed to implement an algorithm, both in terms of memory usage and process time. Calculating an algorithm’s complexity is a key factor in determining the optimal implementation for any project, basically the lower the complexity the better it is in terms of process time. Time...

read more

Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0