From e6ce4299c9596053daaf6b3aad2bc36dda1f650d Mon Sep 17 00:00:00 2001 From: humble-fool-019 Date: Fri, 25 Oct 2019 22:32:40 +0530 Subject: [PATCH 1/2] haacktober fest commiting --- list.cpp | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 list.cpp diff --git a/list.cpp b/list.cpp new file mode 100644 index 0000000..b2a67a7 --- /dev/null +++ b/list.cpp @@ -0,0 +1,65 @@ +#include +#include +using namespace std; +struct node { +int data; +node* link ; +}; +node *head; +void input(int x,int n) +{ +node * temp = new node(); +temp->data = x; +temp->link = NULL; +if (n==1){ + temp->link =head; + head = temp; + return; +} +node *temp1= head; +for (int i=0;ilink; +} +temp->link = temp1->link; +temp1->link = temp; + +} +void rev(){ +node* prev = NULL; +node * current = head; +node * Next ; +while (current != NULL){ + Next = current->link; + current->link= prev; + prev = current; + current = Next; + if (current->link == NULL){ + current ->link = prev; + head = current; + return ; + } + + + +} +} // ENDing of the void function + +void Print (){ +node* temp = head; +while (temp != NULL){ + cout<data; + temp = temp->link; + } +} +int main () { + head = NULL; + input (2,1); + input (4,2); + input (6,3); + input (8,4); + Print (); + rev(); + Print(); + +return 0; +} From ca1271c7d56ff371e51e9c542aa753063de57bc6 Mon Sep 17 00:00:00 2001 From: humble-fool-019 Date: Fri, 25 Oct 2019 22:42:36 +0530 Subject: [PATCH 2/2] my new repository --- hi.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 hi.html diff --git a/hi.html b/hi.html new file mode 100644 index 0000000..3bf700b --- /dev/null +++ b/hi.html @@ -0,0 +1,8 @@ + + +hello + +coding sucks ?? +yup or nope ??????? + + \ No newline at end of file