Code Pumpkin

Tag Archives: Java

Sudoku checker (By traversing each cell only once)

March 31, 2017
Posted by Abhi Andhariya

Sudoku is a logic-based combinatorial number-placement puzzle. Given a partially filled 9×9 2D array i.e. grid[9][9], the goal is to assign digits (from 1 to 9) to the empty cells so that every row, column, and subgrid of size 3×3 contains exactly one instance of the digits from 1 to 9. For Detailed understanding about Sudoku, […]

Snakes N Ladders | Java Program Implementation

March 31, 2017
Posted by Abhi Andhariya

Snakes N Ladders is an ancient Indian board game regarded today as a worldwide classic. It is played between two or more players on a gameboard having numbered, gridded squares. A number of "ladders" and "snakes" are pictured on the board, each connecting two specific board squares. The object of the game is to navigate one's game […]

Tic Tac Toe | Java Program Implementation

March 31, 2017
Posted by Abhi Andhariya

Tic Tac Toe (also known as Noughts and crosses or Xs and Os) is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game. If you are interested in java […]

Stack Implementation Using Array

March 31, 2017
Posted by Abhi Andhariya

A stack is a container of objects that are inserted and removed according to the last-in first-out (LIFO) principle. A stack is a limited access data structure – elements can be added and removed from the stack only at the top. push operation adds an item to the top of the stack. pop removes the item from […]

Graph

March 31, 2017
Posted by Dipen Adroja

Graph is a non linear data structure, it contains a set of points known as nodes (or vertices) and set of links known as edges which connects the vertices. The pictorial representation is shown in the image in the left pane. Types of Graph: Undirected Graph is a graph that is a set of vertices connected by edges, where the […]

Heap (Min/Max Heap)

March 31, 2017
Posted by Dipen Adroja

What is heap? Heap is a balanced binary tree data strucure where the root-node key is compared with its children and arranged accordingly. Max Heap: Root element will always be greater than or equal to either of its child element( see the image on left pane). Min Heap: Root element will always be less than or equal […]

Linked List

March 31, 2017
Posted by Dipen Adroja

A linked list is a dynamic data structure which is consist of nodes and links. The number of nodes in a list is not fixed and can grow and shrink on demand. As Discussed in previous article of ArrayList, this structure will provide us more space effective insertion/deletion for intermediate elements. In this structure it will […]

Sudoku Solver using Recursive Backtracking

March 31, 2017
Posted by Abhi Andhariya

Sudoku  is a logic-based combinatorial number-placement puzzle. Given a partially filled 9×9 2D array grid[9][9], the goal is to assign digits (from 1 to 9) to the empty cells so that every row, column, and subgrid of size 3×3 contains exactly one instance of the digits from 1 to 9. For Detailed understanding about Sudoku, […]

Array List

March 31, 2017
Posted by Dipen Adroja

We can think, arraylist as an array having collection of items which can grow and shrink dynamically. Before going further one question should arise Why we want to use array list instead of array? Answer is very simple, when we need a data structure which have all the array capabilities and is also efficient at […]

Next posts
Total Posts : 124
follow us in feedly

Like Us On Facebook