Friday, June 28, 2024

LINK LIST

 

1. Insert element  at the front. -algorithm

2. Insert element  at the end. -algorithm

3. Insert element  at any position. -algorithm

4. Delete element  from the front. -algorithm

5. Delete element  from the end. -algorithm

6. Delete element  from any position-algorithm

7. Count Node-Algorithm

8. Advantages And Disadvantages

9. Comapre with array

 

doubly link list

1. Insert element  at the front. -algorithm

2. Insert element  at the end. -algorithm

3. Insert element  at any position. -algorithm

4. Delete element  from the front. -algorithm

5. Delete element  from the end. -algorithm

6. Delete element  from any position-algorithm

7. Swap Two Adjacent Element-Algorithm

 

Circular Link List

1. Insert Element  At The Front. -Algorithm

2. Insert Element  At The End. -Algorithm

3. Insert Element  At Any Position. -Algorithm

4. Delete Element  From The Front. -Algorithm

5. Delete Element  From The End. -Algorithm

6. Delete Element  From Any Position-Algorithm

 

 

Stack Using Link List-Algorithm

Queue Using Link List-Algorithm

Sparse Matrix Using Link List

Polynomial Using Link List

Polynomial Add, Subtract, Multiplication -Algorithm

 

 

QUEUE

 

1. Insertion,Deletion,Display Algorithm

2. Double Queue In A Single Array

3. Stack using queue

4.Queue using stack

 

Circular queue

1. Overflow Underflow Condition

2. Insertion, Deletion, Display Algorithm

 

Dqueue

1. Overflow Underflow Condition

2. Insertion, Deletion, Display Algorithm

 

Priority Queue

1. Definition,Example

2. Insertion, Deletion, Display Algorithm

 

Stack

 

1. push/pop/display/peek - algorithm

2. stack Application

3.infix,prefix,postfix

4.infix to prefix  - algorithm

5.infix to postfix - algorithm

6.prefix evaluation- algorithm

7.postfix evaluation- algorithm

8.double stack in a single array- algorithm

Array

 



1. Insert element  at the front.-Algorithm

2. Insert element  at the end.-Algorithm

3. Insert element  at any position.-Algorithm

4. Delete element  from the front.-Algorithm

5. Delete element  from the end.-Algorithm

6. Delete element  from any position-Algorithm

7.Address calculation

8.Advantages,Disadvantages


 

2D Array

1. Row major / Column major address calculation

 

 

Sparse matrix

Upper triangular/Lower triangular matrix

 


DATA STRUCTURE ALL ALGORITHM NEP SYLLABUS

 ARRAY: click

STACK: click

QUEUE: click

LINK LIST: click

TREE:

HASHING:

SEARCHING AND SORTING :

Tuesday, March 5, 2024

C program practice set:






15.Sum of digits :—CLICK

16.

17. 1!+2!+3!+...n :—CLICK

18.1!-2!+3!-4!+...n :—CLICK

19. a+a²+a³+a⁴+a⁵... :—CLICK

20. a-a²+a³-a⁴... :—CLICK

21. (a/1)+(a²/2)+(a³/3)+(a⁴/4)+... :—

22. (a/1!)+(a²/2!)+(a³/3!)+(a⁴/4!)+... :—CLICK

23.a-(a²/2!)+(a³/3!)-(a⁴/4!)... :—CLICK

24. a+(a³/3!)+(a⁵/5!)+... :—CLICK

25. (a²/2!)+(a⁴/4!)+(a⁶/6!)+... :—CLICK

26. Sum of digits :—CLICK

27. 

28. Armstrong number checking :—CLICK

29. Print all factors of a number :—CLICK

30.Count total number of factors :—CLICK

31.Prime number checking :—CLICK

32.Sum of all factors :—CLICK

33. Perfect number checking :—  CLICK

34. Count total numbers of 0 in a number :—CLICK

35. Sum of all odd digits :—CLICK

36. Sum of all odd position and even position digits :—CLICK

37. Decimal to Binary :—CLICK

38. Binary to Decimal :—CLICK

39. Decimal to Octal :—CLICK

40. Octal to Decimal :—CLICK

41. Sum an average of n numbers :—CLICK

42. Program of a^b :—CLICK HERE

43. Input a number and check it is divisible by 3 or not :—CLICK

44. Input a number and check it is divisible by 3 or divisible by 5 or divisible by both or divisible by none :— CLICK

45. Input a salary and increament 10% salary :— CLICK


46. Pattern  

“11111

  22222

  33333

  44444”


 46. Print :

“11111

  22222

  33333

  44444”


#include<stdio.h>

int main()

{

    int i,j;

    for(i=1;i<=4;i++)

    {

        for(j=1;j<=5;j++)

        {

            printf("%d",i);

        }

        printf("\n");

    }

    return 0;

}


45. Input a salary and increament 10% salary :—

 45. Input a salary and increament 10% salary :—


#include<stdio.h>

int main()

{

    int s,i,us;

    printf("enter a salary ");

    scanf("%d",&s);

    i=s*10/100;

    us=s+i;

    printf("Updated salary=%d",us);

    return 0;

}


44. Input a number and check it is divisible by 3 or divisible by 5 or divisible by both or divisible by none :—

 44. Input a number and check it is divisible by 3 or divisible by 5 or divisible by both or divisible by none :—


#include<stdio.h>

int main()

{

    int a;

    printf("enter a value of n ");

    scanf("%d",&a);

    if(a%3==0)

    {

        if(a%5==0)

        {

            printf("%d is divisible by both",a);

        }

        else

        {

            printf("%d is divisible by 3 only",a);

        }

    }

    else

    {

        if(a%5==0)

        {

            printf("%d is divisible by 5 only",a);

        }

        else

        {

            printf("%d is divisible by none of 5 and 3",a);

        }

    }

    return 0;

}


43. Input a number and check it is divisible by 3 or not :—

43. Input a number and check it is divisible by 3 or not :—


#include<stdio.h>

int main()

{

    int n;

    printf("enter a value of n ");

    scanf("%d",&n);

    if(n%3==0)

    {

        printf("divisible by 3");

    }

    else

    {

        printf("not divisible by 3");

    }

    return 0;

}