A Pen by freeCodeCamp.org on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bubbles = []; | |
function setup() { | |
createCanvas(800, 600); | |
for(var i=0; i<0; ++i) | |
{ | |
bubbles[i] = new Bubble(random(750), random(550)); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <ctime> | |
#include <algorithm> | |
using namespace std; | |
void shuffle(int arr[]) | |
{ | |
srand(time(0)); | |
int j=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string.h> | |
#include <typeinfo> | |
using namespace std; | |
struct Node //declaring node | |
{ | |
int data; //data field in the node | |
Node* next; //pointer to next node | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string.h> | |
#include <typeinfo> | |
using namespace std; | |
#define MAX 5 //preprossor for array size | |
int myarray[MAX]; //array for the queue | |
int count = 0; //count to check the status of the queue | |
int front =-1; //front index | |
int rear =-1; //rear index | |
int isempty() //function to see if the queue is empty or not |