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
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
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
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
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