Posts

N Queen Problem ( Backtracking)

Image
The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other. For example, following is a solution for 8 Queen problem.   Naive Algorithm:  Generate all possible configurations of queens on board and print a configuration that satisfies the given constraints. Backtracking Algorithm: The idea is to place queens one by one in different columns, starting from the leftmost column. When we place a queen in a column, we check for clashes with already placed queens. In the current column, if we find a row for which there is no clash, we mark this row and column as part of the solution. If we do not find such a row due to clashes then we move to previous column and find other possible position for the previously placed queen. 1) Start in the leftmost column 2) If all queens are placed i.e. fill_count = no of queens Print the board 3) Try all rows in the current column.  Do followin...

Sudoku (Game Development in vb.net)

Image
SOURCE CODE: https://goo.gl/QjqIiq

SLIDER PUZZLE GAME

Image
SOURCE CODE : SLIDER PUZZLE

Kil Not_Responding Application By a Shortcut_Key

Image
SAVE YOUR P.C FROM GETTING HANG: //For Youtube Video : https://goo.gl/ZY007j     Step 1: Open Notepad on your desktop and type the following command                taskkill /f /fi "windowtitle ne untitled*"                Step 2 : Now go to the file option and click save as. Step 3 : Save it with anyname with .bat at the end of the name e.g. Taskkill.bat Step 4 : Now right click on the file and create a shortcut for that on your desktop. Step 5 : Now right click on that shortcut and go to its properties. Step 6 : Now in the properties go to the Shortcut and then go to the shortcut key option. Step 7 : Now click CTRL + ALT + E and then click on apply.   Now Every time your P.c get hang or you want to close any not-responding  press those magical shortcut key and it will close all the application you...  

THE_CLASSIC _SNAKE IN C++

Image
SOURCE CODE :   //For Youtube tutorials : https://goo.gl/s4rZwP # include <iostream> #include<windows.h> #include<stdlib.h> #include<time.h> #include <conio.h> using namespace std; int i,y,pos[50],length=3,temp,j,f_PosX,f_PosY,movement,head_x=25; int head_y=12,game=1,s_pos_X[200],s_pos_Y[200],temp_x[200],temp_y[200],score=0,wait=200,count=0; char rc=187,hl=205,vl=186,lc=201,ldc=200,rdc=188,t=203,td=202,food=153,sn=254,key; void gotoxy( int x, int y ) { COORD p = {x, y}; SetConsoleCursorPosition(GetStdHandle( STD_OUTPUT_HANDLE ), p ); } char snake[200]; void move(); void in_snake(); void pos_val(); void boder(); void food_pos(); void show_food(); void sn_dir(); void pause_play(); void game_play(); void sn_eat(); void check(); void start(); int main() { boder(); key=getch(); Sleep(10); if(key=='p'|| key=='P') { start(); } else { main(); } } void move() { if(movement==6) { gotoxy(s_p...