From a5d700875536c60048cbd8e4c4eb29c6418e2ec5 Mon Sep 17 00:00:00 2001 From: ns98 <43982656+ns98@users.noreply.github.com> Date: Tue, 9 Oct 2018 18:21:10 +0530 Subject: [PATCH] Create TripletRepresentationofSparseMatrix.cpp This file contains the program of triplet representation of sparse matrix. --- .../TripletRepresentationofSparseMatrix.cpp | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 data-structures/TripletRepresentationofSparseMatrix.cpp diff --git a/data-structures/TripletRepresentationofSparseMatrix.cpp b/data-structures/TripletRepresentationofSparseMatrix.cpp new file mode 100644 index 00000000..9adad0ff --- /dev/null +++ b/data-structures/TripletRepresentationofSparseMatrix.cpp @@ -0,0 +1,41 @@ +#include +using namespace std; +int main() +{int row,column,i,j; +printf("enter no. of rows and columns:"); +scanf("%d %d",&row,&column); +int a[row][column]; +for(i=0;i