Doubly_Linked_List||Insert_front && Delete_front||programming_info
Solution using C Language:#include<stdio.h>#include<stdlib.h>struct dnode{int info;struct dnode*prev;struct dnode*next;};void insert_front(struct dnode **p,int item){struct dnode *temp;temp=(struct dnode*)malloc(sizeof(struct dnode));temp->prev=NULL;temp->info=item;temp->next=NULL;struct dnode *q;q=*p;if(q==NULL){*p=temp;}else{temp->next=q;q->prev=temp;*p=temp;}}void...
Singly_Linked_List||Insert Rear and Delete Rear||programming_info
Solution using C language:#include<stdio.h>#include<stdlib.h>struct node{int info;struct node*link;};void insert_rear(struct node **p,int item){struct node *temp;temp=(struct node*)malloc(sizeof(struct node));temp->link=NULL;temp->info=item;if(*p==NULL){*p=temp;}else{struct node *q;q=*p;while(q->link!=NULL){q=q->link;}q->link=temp;}}void...
Singly_Linked_List||Insert front and Delete front||programming_info
Enormous Input Test||codechef||beginner solution ||programming info
Enormous Input Test
The purpose of this problem is to verify whether the method you are using to read input data is sufficiently fast to handle problems branded with the enormous Input/Output warning. You are expected to be able to process at least 2.5MB of input data per second at runtime.
Input
The input begins with two positive integers...
Turbo Sort||codechef||beginner solution ||programming info
Turbo Sort
Given the list of numbers, you are to sort them in non decreasing order.
Input
t – the number of numbers in list, then t lines follow [t <= 10^6].Each line contains one integer: N [0 <= N <= 10^6]
Output
Output given numbers in non decreasing order.
Example
Input:
5
5
3
6
7
1
Output:
1
3
5
6
7
Solution...
Small factorials||codechef||beginner solution ||programming info
Small factorials
You are asked to calculate factorials of some small positive integers.
Input
An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100.
Output
For each integer n given at input, display a line with the value of n!
Example
Sample input:
4
1
2
5
3
Sample...
Day 9: factorial 3|| hackerrank || 30 days of code || programming_info
Objective
Today, we're learning and practicing an algorithmic concept called Recursion. Check out the Tutorial tab for learning materials and an instructional video!
Recursive Method for Calculating Factorial
Task
Write a factorial function that takes a positive integer, as a parameter and prints the result...