Commits

Stephen Tanner committed cec9f5c

Finished

Comments (0)

Files changed (14)

+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.331384279">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.331384279" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.331384279" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
+					<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.331384279." name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.1151814814" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.600027497" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
+							<builder buildPath="${workspace_loc:/archers_dilemma/Debug}" id="cdt.managedbuild.builder.gnu.cross.623172740" managedBuildOn="true" name="Gnu Make Builder.Debug" superClass="cdt.managedbuild.builder.gnu.cross"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.42601954" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.804104216" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
+								<option id="gnu.c.compiler.option.debugging.level.1953092160" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.465449149" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1158993610" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
+								<option id="gnu.cpp.compiler.option.optimization.level.2007584127" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+								<option id="gnu.cpp.compiler.option.debugging.level.579412894" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.42283930" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
+								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1873756784" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.744607137" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1010729997" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1822458762" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1958793458" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.1356533682">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1356533682" moduleId="org.eclipse.cdt.core.settings" name="Release">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.1356533682" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
+					<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.1356533682." name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.91313069" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.580338568" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
+							<builder buildPath="${workspace_loc:/archers_dilemma/Release}" id="cdt.managedbuild.builder.gnu.cross.1143166596" managedBuildOn="true" name="Gnu Make Builder.Release" superClass="cdt.managedbuild.builder.gnu.cross"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.2041189108" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
+								<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1358129304" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
+								<option id="gnu.c.compiler.option.debugging.level.1991168990" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.720505626" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1059608455" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
+								<option id="gnu.cpp.compiler.option.optimization.level.1285047702" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+								<option id="gnu.cpp.compiler.option.debugging.level.1804569056" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.937465575" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
+								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.271561083" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1760065568" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1579732916" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.assembler.189424508" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1824970268" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="archers_dilemma.cdt.managedbuild.target.gnu.cross.exe.603298462" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1356533682;cdt.managedbuild.config.gnu.cross.exe.release.1356533682.;cdt.managedbuild.tool.gnu.cross.c.compiler.2041189108;cdt.managedbuild.tool.gnu.c.compiler.input.720505626">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.331384279;cdt.managedbuild.config.gnu.cross.exe.debug.331384279.;cdt.managedbuild.tool.gnu.cross.c.compiler.42601954;cdt.managedbuild.tool.gnu.c.compiler.input.465449149">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+		</scannerConfigBuildInfo>
+	</storageModule>
+</cproject>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>archers_dilemma</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>?name?</key>
+					<value></value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.append_environment</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildArguments</key>
+					<value></value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildCommand</key>
+					<value>make</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildLocation</key>
+					<value>${workspace_loc:/archers_dilemma/Debug}</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+					<value>clean</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.contents</key>
+					<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.stopOnError</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+					<value>true</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>

src/Debug/archers_dilemma

Binary file added.
+main.d: ../main.c ../queue.h
+
+../queue.h:

src/Debug/main.o

Binary file added.

src/Debug/makefile

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+-include ../makefile.init
+
+RM := rm -rf
+
+# All of the sources participating in the build are defined here
+-include sources.mk
+-include subdir.mk
+-include objects.mk
+
+ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(strip $(C_DEPS)),)
+-include $(C_DEPS)
+endif
+endif
+
+-include ../makefile.defs
+
+# Add inputs and outputs from these tool invocations to the build variables 
+
+# All Target
+all: archers_dilemma
+
+# Tool invocations
+archers_dilemma: $(OBJS) $(USER_OBJS)
+	@echo 'Building target: $@'
+	@echo 'Invoking: Cross GCC Linker'
+	gcc  -o "archers_dilemma" $(OBJS) $(USER_OBJS) $(LIBS)
+	@echo 'Finished building target: $@'
+	@echo ' '
+
+# Other Targets
+clean:
+	-$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) archers_dilemma
+	-@echo ' '
+
+.PHONY: all clean dependents
+.SECONDARY:
+
+-include ../makefile.targets

src/Debug/objects.mk

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+USER_OBJS :=
+
+LIBS :=
+

src/Debug/queue.d

+queue.d: ../queue.c ../queue.h
+
+../queue.h:

src/Debug/queue.o

Binary file added.

src/Debug/sources.mk

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+O_SRCS := 
+C_SRCS := 
+S_UPPER_SRCS := 
+OBJ_SRCS := 
+ASM_SRCS := 
+OBJS := 
+C_DEPS := 
+EXECUTABLES := 
+
+# Every subdirectory with source files must be described here
+SUBDIRS := \
+. \
+

src/Debug/subdir.mk

+################################################################################
+# Automatically-generated file. Do not edit!
+################################################################################
+
+# Add inputs and outputs from these tool invocations to the build variables 
+C_SRCS += \
+../main.c \
+../queue.c 
+
+OBJS += \
+./main.o \
+./queue.o 
+
+C_DEPS += \
+./main.d \
+./queue.d 
+
+
+# Each subdirectory must supply rules for building sources it contributes
+%.o: ../%.c
+	@echo 'Building file: $<'
+	@echo 'Invoking: Cross GCC Compiler'
+	gcc -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<"
+	@echo 'Finished building: $<'
+	@echo ' '
+
+
+/*
+ * main.c
+ *
+ *  Created on: Apr 2, 2012
+ *      Author: stanner
+ */
+
+#include "queue.h"
+
+//Floor struct
+struct Floor {
+	int num;
+	struct Floor *up;
+	struct Floor *down;
+};
+
+//Function Prototypes
+int goUp (int floor, int up, int ceiling);
+int goDown (int floor, int down);
+void queUp(struct Queue *q, struct Floor *f, struct Queue *set);
+void queDown(struct Queue *q, struct Floor *f, struct Queue *set);
+struct Floor *newFloor(int i);
+
+int main (void) {
+
+	//
+
+
+	int S,N,G,U,D = 0;
+	//N = 10;
+	//S = 1;
+	//G = 7;
+	//U = 4;
+	//D = 2;
+	printf("Please input the values in this order (with spaces): N S G U D\n");
+	scanf("%d %d %d %d %d", &N, &S, &G, &U, &D);
+
+	struct Queue newQ;
+	init(&newQ);
+
+	struct Queue set;
+	init(&set);
+
+
+	//Queue the root node
+	enqueue(&newQ, S);
+
+
+	struct Floor nn, *node = &nn;
+	while (!isEmpty(&newQ)) {
+		//dequeue current node
+		int f = dequeue(&newQ);
+		enqueue(&set, f);
+
+		if (f == G) {
+			break;
+		}
+
+
+		//generate new states for up and down nodes
+
+		node = newFloor(f);
+		//node.num = f;
+		int up = goUp(node->num, U, N);
+		int down = goDown(node->num, D);
+		node->up = newFloor(up);
+		node->down = newFloor(down);
+
+		//add new nodes to queue
+		if (!contains(&set, up)) {
+			queUp(&newQ, node, &set);
+
+		}
+		if(!contains(&set, down)) {
+			queDown(&newQ, node, &set);
+		}
+
+
+	}
+
+	if (contains(&set, G)) {
+		printf("Danger zone.\n");
+	}
+	else {
+		printf("LANA");
+	}
+
+	return 0;
+
+
+}
+
+void queUp(struct Queue *q, struct Floor *f, struct Queue *set) {
+	//Add the floor found by goin up, to the queue
+	if (f->up->num != -1) {
+		int num = f->up->num;
+		enqueue(q, num);
+		enqueue(set, num);
+	}
+}
+void queDown(struct Queue *q, struct Floor *f, struct Queue *set) {
+	//Add the floor found by goin down, to the queue
+	if (f->down->num != -1) {
+		int num = f->down->num;
+		enqueue(q, num);
+		enqueue(set, num);
+	}
+}
+
+int goUp (int floor, int up, int ceiling) {
+	//Calculate the floor found by pressing the up button
+	if (floor + up >= ceiling) {
+		return -1;
+	}
+	else {
+		return floor + up;
+	}
+}
+
+int goDown (int floor, int down) {
+	//Calculate the floor found by pressing the down button
+	if (floor - down < 0) {
+		return -1;
+	}
+	else {
+		return floor - down;
+	}
+}
+
+struct Floor *newFloor(int i) {
+	//Create a new floor on the fly for added to the queue and set
+	struct Floor floor, *ff = &floor;
+	ff = (struct Floor *) malloc(sizeof(struct Floor));
+	ff->num = i;
+	ff->down = (void *) -1;
+	ff->up = (void *) -1;
+	return ff;
+}
+/*
+ * main.c
+ *
+ *  Created on: Apr 2, 2012
+ *      Author: stanner
+ */
+
+#include "queue.h"
+//#include <stdlib.h>
+
+
+void init(struct Queue *q) {
+	/* Done */
+	q->front = NULL;
+	q->rear = NULL;
+}
+
+void enqueue(struct Queue *q, int data) {
+	/* Done */
+	struct Node *newNode;
+	newNode = (struct Node *) malloc(sizeof(struct Node));
+	newNode->data = data;
+	newNode->next = NULL;
+
+	if (isEmpty(q)) {
+		q->front = newNode;
+
+	}
+	else {
+		q->rear->next = newNode;
+	}
+
+	q->rear = newNode;
+
+	size(q);
+
+}
+
+int dequeue(struct Queue *q) {
+
+	if (isEmpty(q)) {
+		return 0;
+	}
+
+	struct Node *nn;
+
+	nn = q->front;
+
+	int data = nn->data;
+
+	if (size(q) == 1) {
+		q->rear = NULL;
+		init(q);
+	}
+
+	q->front = nn->next;
+
+
+
+	free(nn);
+
+	nn = NULL;
+
+	return data;
+}
+
+
+int peekFront(struct Queue *q) {
+	/* Done */
+	return q->front->data;
+}
+int peekRear(struct Queue *q) {
+	/* Done */
+	return q->rear->data;
+}
+
+
+int contains(struct Queue *q, int data) {
+	/* Done */
+	struct Node *nn;
+	nn = q->front;
+
+	while (nn != NULL) {
+		if (nn->data == data) {
+			return 1;
+		}
+		nn = nn->next;
+	}
+
+	return 0;
+}
+int isEmpty(struct Queue *q) {
+	/* Done */
+	if (q->front == NULL) {
+		return 1;
+	}
+	else {
+		return 0;
+	}
+}
+int size(struct Queue *q) {
+	/* Done */
+	struct Node *nn;
+	nn = q->front;
+	int count = 0;
+	while (nn != NULL) {
+		count++;
+		nn = nn->next;
+	}
+	return count;
+}
+
+
+
+
+
+
+
+
+
+
 
+
+#include <stdio.h>
+#include <stdlib.h>
 /*
  * Struct representing the Queue.
  * Contains a pointer to the front Node and the rear Node.
  */
-struct Queue
-{
+struct Queue {
 	struct Node *front;
 	struct Node *rear;
 };
  * Contains an int data element and a pointer to the next
  * Node struct.
  */
-struct Node
-{
+struct Node {
 	int data;
 	struct Node *next;
 };
 
 
-
-
 /* Initializes the Queue's front and rear pointers to NULL */
 void init(struct Queue *q);
 
 
 
 
+