Pages

HTML Table scroll vertical and horizontal fixed header


HTML:

Here is the sample code for scrolling vertical and horizontal with fixed header:

 <div class="outer-container">

        <div class="inner-container">

            <div class="table-header">

Sticky Header for Scrollable Table

HTML:

Here is the code for Sticky Header for Scrollable Table :

<table id="table-1">
    <thead>
     <tr>
            <th>Col1</th>
            <th>Col2</th>
            <th>Col3</th>
        </tr>

Array Manipulation Hackerrank Level Hard Problem - Made it easy to understand.

Here is the code:

 //  => Brute Force Solution: O(m* n)
        static long arrayManipulation(int n, int[][] queries)
        {
            long[] arr = new long[n];

Merge Sort Algorithm in C#

Here is the code:


        public int[] MergeSort(int[] arr)
        {

Merge two sorted arrays to one array in C#

Here is the code:
        public static int[] Merge(int[] nums1,  int[] nums2)

Binary search algorithm with recursion in C#

Here is the code:

    public int Search(int[] nums, int target) { 

Binary search algorithm without recursion in C#. Made it easy to understand.

Here is the Code:

    public int Search(int[] nums, int target) { 
        int s=0;

Rotate Array to K places in C#

Given an array, rotate the array to the right by k steps, where k is non-negative.
Example 1:
Input: [1,2,3,4,5,6,7] and k = 3

Optimal Maximum distance traveled problem

Given max travel distance, forward and backwards routes, return the routes which utilizes maximum travel distance.
Example:
Forward route : [[1,3000],[2,5000],[3,4000],[4,10000],[5,8000]]
Backward route : [[1,1000],[2,3000],[3,4000]]
Max Distance Traveled: 11000

Check if path exists between two nodes in a graph using Breadth first search (BFS)

Here is the code:

class Program
    {
        static List<int> li = new List<int>();
        static void Main(string[] args)
        {         
            node r0 = new node(0);

Check if path exists between two nodes in a graph using Depth first search (DFS)

Here is the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication75
{
    class Program
    {
        static List<int> li = new List<int>();
        static void Main(string[] args)
        {         
            node r0 = new node(0);

Breadth first search (BFS) Levels implementation in C#

Here is the code:

 class Program
    {
        static List<int> li = new List<int>();
        static void Main(string[] args)
        {         
            node r0 = new node(0);
            node r1 = new node(1);

Breadth first search (BFS) Graphs implementation in C#

Here is the code:
 class Program
    {
        static List<int> li = new List<int>();
        static void Main(string[] args)
        {         
            node r0 = new node(0);

Depth First Search (DFS) Graphs implmentation in C#. Made it easy to understand.

Here is the Code:

class Program
    {

        static List<int> li = new List<int>();
        static void Main(string[] args)
        {         
            node r0 = new node(0);

How to create a Quene data structure in C#

Here is the Code:

class Program
    {
        static void Main(string[] args)
        {
            Quene q = new Quene();
 //   This Solution is written by me and is not completely tested. Please comment if you found any alternative solutions or any enhancement to my solution.
            q.add(1);

How to create Stack data structure in C# with Push() and Pop() functions

Here is the Code:

  class Program
    {
        static void Main(string[] args)
        {
    //   This Solution is written by me and is not completely tested. Please comment if you found any alternative solutions or any enhancement to my solution.
            stack s = new stack();

Function to Sort elements of a Linked List in C#

Here is the code:

    class Program
    {
        static void Main(string[] args)
        {
    //   This Solution is written by me and is not completely tested. Please comment if you found any alternative solutions or any enhancement to my solution.
            LinkedList l = new LinkedList();

Function to Display elements of the LinkedList from Kth integer in C#

Here is Code:
 class Program
    {
        static void Main(string[] args)
        {
    //   This Solution is written by me and is not completely tested. Please comment if you found any alternative solutions or any enhancement to my solution.
            LinkedList l = new LinkedList();

Popular Posts