Coder Social home page Coder Social logo

ds_lab's Introduction

ds_lab

DS LAB

Contains solutions for all DS Lab Programs. This repository contains all you need for DS Lab of KTU Semester 3 The program description are given below and you can open the corresponding program from the repository.


CYCLE 1

  • 1.Write a function rotate(int a[],int n,char d,int cr) to rotate given array elements.The function will take the array, number of elements in the array, direction of rotation(l-left r-right) and count of rotation( how many times to rotate)
  • 2.Find the mean, median and mode of list of elements. Use array to implement the same.(assume Unimode )
  • 3.Find the frequency of occurrence of each character in the string ( histogram)
  • 4.Consider two sets S1={1,2,3,4}, and S2={3,4,5}. Find the intersection of S1 and S2={3,4}.Implement the set operation intersection using arrays.
  • 5.An nx4 array stores 4 bit binary numbers. Read the matrix and print the hexadecimal equivalent of the same.

CYCLE 2

  • 6.Write a program to read two polynomials and store them in an array. Calculate the sum of the two polynomials and display the first polynomial, second polynomial and the resultant polynomial.
  • 7.Read and polynomial of degree n and store in an array. Evaluate this polynomial for a given value of x. Eg: 3x^2+2x+1 x=2 evaluation=12+4+1=17
  • 8.Given a sparse matrix . Represent and store it using an efficient method. Also find the sparsity (The sparsity of a matrix can be quantified with a score, which is the number of zero values in the matrix divided by the total number of elements in the matrix.)
  • 9.Input the representation of two sparse matrices. Obtain the representation of their sum.
  • 10.Input the representation of a sparse matrix. Find the representation of its transpose.
  • 11.Check whether the given matrix is sparse symmetric using the representation given.

CYCLE 3

  • 12.Implement a stack using an array.
  • 13.Implement multiple stacks(2 stacks) using an array. Consider memory efficient implementation
  • 14.Find the minimum element in a stack in O(1) time using an auxiliary stack which keeps track of the minimum element.
  • 15.implement a sorted push so that stack is always maintained in sorted order.
  • 16.Convert a given decimal number into binary and hex using stack.
  • 17.Check whether a string is palindrome using stack.
  • 18.Check whether the parenthesis are balanced in an expression using stack.
  • 19.Convert a given infix expression to postfixusing stack.
  • 20.Convert a given infix expression to prefix using stack.
  • 21.Evaluate a postfix expression.
  • 22.Evaluate a prefix expression.

CYCLE 4

  • 23.Create a linked list with n elements by adding elements at the end.
  • 24.Given a node data, insert a new node after it.
  • 25.Given a node data, insert a new node before it.
  • 26.Insert a new node in the given position.
  • 27.Delete a node, given the key data value.
  • 28.Delete a node given the position.
  • 29.Delete the smallest element from the list.
  • 30.Reverse a list.
  • 31.Search for a given element and print it's position.
  • 32.Create a list in sorted order.
  • 33.Implement a stack using singly linked list (this can be considered as a part of the previous assignment on stack).

CYCLE 5

  • 34.Queue - Implement using array and Linked List.
  • 35.Circlular Queue ( Ring Buffer)- Implement Using Array and Linked List.
  • 37.Priority Queue -Implement Using Array or Linked List.
  • 38.Double Ended Queue –Implement using linked list.

ds_lab's People

Contributors

jaison080 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.