blogsarmistha-blog
blogsarmistha-blog
Csharpstar.com
82 posts
Don't wanna be here? Send us removal request.
blogsarmistha-blog ¡ 8 years ago
Text
C# - Using Table Valued Parameter
C# – Using Table Valued Parameter
In this article, we will learn:
What is Table Valued Parameter?
How to pass Table Valued Parameter from C#?
Advantages of using Table Valued Parameter?
  What is Table Valued Parameter?
Table Valued Parameters are used to pass multiple rows of data from a .net/client application to SQL Server without multiple round trips. we can pass multiple rows of a table to a stored procedure.  
How to create…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Brute-Force Algorithm
C# – Brute-Force Algorithm
In this article, we will learn C# implementation of Brute-Force Algorithm.Brute-force search or exhaustive search, also known as generate and test, is a very general problem-solving technique that consists of systematically enumerating all possible candidates for the solution and checking whether each candidate satisfies the problem’s statement
  using System; using System.Collections.Generic;…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Knapsack Problem
C# – Knapsack Problem
In this article, we will write C# implementation for Knapsack problem
  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace KnapsackAlgo { class KnapsackAlgorithm { public static int KnapSack(int capacity, int[] weight, int[] value, int itemsCount) { int[,] K = new int[itemsCount + 1, capacity + 1]; for (int i = 0; i <=…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Bellman–Ford Algorithm
C# – Bellman–Ford Algorithm
In this article, we will learn C# implementation of Bellman–Ford Algorithm for determining the shortest paths from a single source vertex to all of the other vertices in a weighted graph
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace BellmanFordAlgorithm { class BellmanFordAlgo { public struct Edge { public int Source;…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Floyd–Warshall Algorithm
C# – Floyd–Warshall Algorithm
In this article, we will learn C# implementation of Floyd–Warshall Algorithm for determining the shortest paths in a weighted graph with positive or negative edge weights
  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace FloydWarshallAlgorithm { class FloydWarshallAlgo { public const int cst = 9999; private static void…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Dijkstra Algorithm for Determining the Shortest Path
C# – Dijkstra Algorithm for Determining the Shortest Path
In this article, we will learn C# implementation of Dijkstra Algorithm for Determining the Shortest Path
Dijkstra’s algorithm is an algorithm for finding the shortest paths between nodes in a graph.It was conceived by computer scientist Edsger W. Dijkstra in 1956.This algorithm helps to find the shortest path from a point in a graph (the source) to a destination.  
using System; using…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Breadth First Search (BFS) using Queue
C# – Breadth First Search (BFS) using Queue
In this article, we will write a C# program to implement Breadth First Search (BFS) using Queue
Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph) and explores the neighbor nodes first, before moving to the next level neighbors.  
using System; using System.Collections.Generic; using…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Depth First Seach (DFS) using List
C# – Depth First Seach (DFS) using List
In this article, we will write a C# program to implement Depth First Search using List.
Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking.  
using System; using System.Collections.Generic;…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Huffman coding using Dictionary
C# – Huffman coding using Dictionary
In this article, we will learn the C# implementation for Huffman coding using Dictionary
Huffman coding is a lossless data compression algorithm. The idea is to assign variable-legth codes to input characters, lengths of the assigned codes are based on the frequencies of corresponding characters. The most frequent character gets the smallest code and the least frequent character gets the largest…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Coin change problem : Greedy algorithm
C# – Coin change problem : Greedy algorithm
In this article, we will discuss an optimal solution to solve Coin change problem using Greedy algorithm.
  A greedy algorithm is the one that always chooses the best solution at the time, with no regard for how that choice will affect future choices.Here, we will discuss how to use Greedy algorithm to making coin changes.   It has been proven that an optimal solution for coin changing can always…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Hash data using salt
C# – Hash data using salt
In this article, we will write a C# program to hash data/password using salt value
  using System; using System.Text; using System.Security.Cryptography; public class CsharpHashAlgorithm { public static string ComputeHash(string plainText, string hashAlgorithm, byte[] saltBytes) { // If salt is not specified, generate it on the fly. if (saltBytes == null) { // Define min and max salt sizes. int…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Encrypt and Decrypt data using a symmetric key - Rijndael Algorithm
C# – Encrypt and Decrypt data using a symmetric key – Rijndael Algorithm
In this article, we will write a C# program to Encrypt and Decrypt data using a symmetric key
  What is Symmetric Key?
Symmetric-key algorithms are algorithms for cryptography that use the same cryptographic keys for both encryption of plaintext and decryption of ciphertext. The keys may be identical or there may be a simple transformation to go between the two keys.  
C# Implementation to Encrypt…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# Program to Illustrate Lower Triangular Matrix
C# Program to Illustrate Lower Triangular Matrix
In this article, we will write a C# program to illustrate Lower Triangular Matrix
What is Lower Triangular Matrix?
  A square matrix is called lower triangular if all the entries above the main diagonal are zero. A triangular matrix is one that is either lower triangular or upper triangular. A matrix that is both upper and lower triangular is called a diagonal matrix.  
using System; using…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# Program to Illustrate Upper Triangular Matrx
C# Program to Illustrate Upper Triangular Matrx
In this article, we will write a C# program to illustrate Upper Triangular Matrix
What is Upper Triangular Matrix?
  A square matrix is called upper triangular if all the entries below the main diagonal are zero. A triangular matrix is one that is either lower triangular or upper triangular. A matrix that is both upper and lower triangular is called a diagonal matrix.  
using System; using…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
C# - Singly LinkedList Traversal
C# – Singly LinkedList Traversal
In this article, we will write a C# program to implement Singly LinkedList traversal
  using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace LinkedList { class singleLinkedlist { private int data; private singleLinkedlist next; public singleLinkedlist() { data = 0; next = null; } public singleLinkedlist(int value) { data = value; next = null; } public…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
Create a Circular Singly Linked List in C#
Create a Circular Singly Linked List in C#
In this article, we will write a C# program to implement a Singly linked Circular linked List
  Circular Linked List is a linked data structure. – In the circular linked list we can insert elements anywhere in the list – In the circular linked list the previous element stores the address of the next element and the last element stores the address of the starting element. – The circular linked list…
View On WordPress
0 notes
blogsarmistha-blog ¡ 8 years ago
Text
Towers of Hanoi in C#
Towers of Hanoi in C#
Towers of Hanoi or Tower of Brahma or Lucas’ Tower
  Tower of Hanoi is a mathematical game or puzzle. It consists of three rods(towers), and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.   The objective of the puzzle is to move the…
View On WordPress
0 notes