New game
Download
Get Academic Plan
Share game
Integrate it into your platform

You can integrate the game into an LMS compatible with LTI 1.1 or LTI 1.3 such as Canvas, Moodle, or Blackboard. This way, the scores will be automatically saved into the platform’s gradebook.
Download
You have exceeded the maximum number of games you can integrate into Google Classroom with your current Plan.

To integrate as many games as you want in Google Classroom, you need an Academic Plan or a Commercial Plan.

You have exceeded the maximum number of games you can integrate into Microsoft Teams with your current Plan.

To integrate as many games as you want in Microsoft Teams, you need an Academic Plan or a Commercial Plan.

Downloading games is an exclusive feature for users with an Academic Plan or a Commercial Plan.

Get your Academic Plan or your Commercial Plan now and start integrating your games into your LMS, website or blog.

If you wish, you can download a demo game here and test its integration:

BFS бойынша тапсырма

Fill in the Blanks

Played 0

About this activity

бос орындарды сәйкес келетін сөздермен толтырыңыз

Created by

Kazakhstan

Download the paper version to play

Make your own free game from our game creator
Compete against your friends to see who gets the best score in this game

Top Games

%
Anonymous
Anonymous
%
%
%
You have exceeded the maximum number of games you can print with your current Plan.

To print as many games as you want, you need an Academic Plan or a Commercial Plan.

Print your game
BFS бойынша тапсырма
 

Fill in the Blanks

BFS бойынша тапсырмаOnline version

бос орындарды сәйкес келетін сөздермен толтырыңыз

by Шұғыла Бердімұрат
1

#include
#include

MAX 20

int queue [ ] ;
int front = - 1 , = - 1 ;

void enqueue ( value ) {
+ + ;
queue [ rear ] = value ;
if ( front = = - 1 )
front = 0 ;
}

int dequeue ( ) {
value = queue [ front ] ;
front + + ;
return value ;
}

bool isEmpty ( ) {
if ( front = = - 1 | | front > rear )
return ;
return ;
}

void BFS ( int [ MAX ] [ MAX ] , int n , int start ) {
int visited [ MAX ] ;

( int i = 0 ; i < n ; i + + ) {
visited [ i ] = 0 ;
}

enqueue ( start ) ;
visited [ start ] = 1 ;

( ! isEmpty ( ) ) {
int current = dequeue ( ) ;
printf ( " %d " , current ) ;

for ( int i = 0 ; i < n ; i + + ) {
if ( graph [ current ] [ i ] = = 1 && visited [ i ] = = 0 ) {
enqueue ( i ) ;
visited [ i ] = 1 ;
}
}
}
}

int main ( ) {
int n ;
int start ;

int graph [ MAX ] [ MAX ] ;

/ / ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
for ( int i = 0 ; i < ; i + + ) {
for ( int j = 0 ; j < n ; j + + ) {
scanf ( " " , &graph [ i ] [ j ] ) ;
}
}

scanf ( " %d " , &start ) ;

BFS ( graph , n , start ) ;

0 ;
}

Are you sure you want to leave the page?

If you leave, you will lose the game in progress.