This file contains 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
/* | |
You are given an empty chess board of size N*N. Find the number of ways to place N queens on the board, such that no two queens can kill each other in one move. A queen can move vertically, horizontally and diagonally. | |
Input Format | |
A single integer N, denoting the size of chess board. | |
Constraints | |
1<=N<=11 |
This file contains 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
/* | |
You are given an empty chess board of size N*N. Find the number of ways to place N queens on the board, such that no two queens can kill each other in one move. A queen can move vertically, horizontally and diagonally. | |
Input Format | |
A single integer N, denoting the size of chess board. | |
Constraints | |
1<=N<=11 |
This file contains 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
package LinkedList; | |
class node | |
{ | |
int data; | |
node next; | |
node prev; | |
public node(int data) | |
{ | |
this.data = data; |
This file contains 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
package StringProgram; | |
/* | |
Count of numbers between range having only non-zero digits whose sum of digits is N and number is divisible by M | |
Difficulty Level : Hard | |
Last Updated : 23 Apr, 2020 | |
Given a range [L, R] and two positive integers N and M. The task is to count the numbers in the range containing only non-zero digits whose sum of digits is equal to N and the number is divisible by M. | |
Examples: |
This file contains 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
package Sortting.MergeSort; | |
public class MergeSortExample { | |
int arr[]; | |
public MergeSortExample(int size) | |
{ | |
arr = new int[size]; | |
} |
This file contains 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
package Sortting.MergeSort; | |
public class MergeSortExample { | |
int arr[]; | |
public MergeSortExample(int size) | |
{ | |
arr = new int[size]; | |
} |
This file contains 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
package Contest1; | |
/* | |
Program1 | |
Find a key?? | |
You are provided with 3 numbers : input1 , input2 input 3; | |
each of these are four digit numbers within the range >==1000 and 9999, |
This file contains 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
class node { | |
int data; | |
node left; | |
node right; | |
public node(int data) { | |
this.data = data; | |
left = right = null; | |
} |
This file contains 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
class node { | |
int data; | |
node left; | |
node right; | |
public node(int data) { | |
this.data = data; | |
left = right = null; | |
} |
This file contains 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
package Tree; | |
import Tree.BinaryTree.Node; | |
public class Newclass { | |
Tree.BinaryTree.Node root; | |
NewerOlder