Programming Tricks

The following examples are implementations of the popular data structures in C#.

A data structure is a particular way of storing and organizing data so that it can be used efficiently.

Different types of data structures are suited for different kinds of applications. Some are highly specialized to specific tasks. For example, hash tables are best suited to look up identifiers.

.

The following examples are implementations of the popular data structures in C#.

A data structure is a particular way of storing and organizing data so that it can be used efficiently.

Different types of data structures are suited for different kinds of applications. Some are highly specialized to specific tasks. For example, hash tables are best suited to look up identifiers.

.

Here are a select few with full implementation. All you have to do is copy and paste the code and run them step by step

What are the number of set bits in an integer?

Determine Endianess

Hanoi Towers

Convert an integer to a binary representation

How to swap two variables without using a third one?

Determine if a number is odd or even?

How to multiply two numbers without using the multiplication operator?

Fibonacci series

Factorial

GCD

What are the number of set bits in an integer?

Determine Endianess

Hanoi Towers

Convert an integer to a binary representation

How to swap two variables without using a third one?

Determine if a number is odd or even?

How to multiply two numbers without using the multiplication operator?

Fibonacci series

Factorial

GCD