0% found this document useful (0 votes)
36 views2 pages

Plagiarism Scan Report: Content Checked For Plagiarism

The document is a plagiarism scan report for a source code file. The report indicates that the content checked was 100% unique with no plagiarism detected. It provides details on the number of words, characters, and whether any ignore URLs were used in the analysis.

Uploaded by

kartik8586
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

Plagiarism Scan Report: Content Checked For Plagiarism

The document is a plagiarism scan report for a source code file. The report indicates that the content checked was 100% unique with no plagiarism detected. It provides details on the number of words, characters, and whether any ignore URLs were used in the analysis.

Uploaded by

kartik8586
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Plagiarism Scan Report

Summary
Report Genrated Date 29 Mar, 2017
Plagiarism Status 100% Unique
Total Words 226
Total Characters 1312
Any Ignore Url Used

m
Content Checked For Plagiarism:

co
#include
#include

s.
#include
#define bool int
#define true 1 ol
#define false 0
struct Node
To
{
int data;
struct Node *next, *prev;
};
eo

void pairSum(struct Node *head, int x)


{
lS

struct Node *first = head;


struct Node *second = head;
al

while (second->next != NULL)


second = second->next;
Sm

bool found = false;

while (first != NULL && second != NULL &&


first != second && second->next != first)
{
if ((first->data + second->data) == x)
{
found = true;
printf("(%d,%d)\n" , first->data , second->data);

first = first->next;

second = second->prev;
}
else
{
if ((first->data + second->data) < x)
first = first->next;
else
second = second->prev;
}
}

if (found == false)
printf("No pair found");
}

void insert(struct Node **head, int data)


{

m
struct Node *temp;
temp = (struct Node*)malloc(sizeof(struct Node));

co
temp->data = data;
temp->next = temp->prev = NULL;
if (!(*head))
(*head) = temp;

s.
else
{ ol
temp->next = *head;
(*head)->prev = temp;
To
(*head) = temp;
}
}
eo

int main()
{
struct Node *head = NULL;
lS

int i , x , num;
printf("Give the value of x :");
scanf("%d" , &x);
al

printf("Enter the number of elements in the linked list : ");


scanf("%d" , &num);
Sm

for( i =0 ;i < num ; i++){


int n ;
printf("Enter the value of element %d :" , i+1 );
scanf("%d" , &n);
insert(&head , n);
}

pairSum(head, x);

return 0;
}

Report generated by smallseotools.com

You might also like