Skip to content

Instantly share code, notes, and snippets.

View laxmankumar2000's full-sized avatar

Laxman Kumar laxmankumar2000

  • Mathura UP
View GitHub Profile
@laxmankumar2000
laxmankumar2000 / countN_Queen.java
Created January 7, 2022 07:16
n_Queen_Problem
/*
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
/*
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
package LinkedList;
class node
{
int data;
node next;
node prev;
public node(int data)
{
this.data = data;
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:
package Sortting.MergeSort;
public class MergeSortExample {
int arr[];
public MergeSortExample(int size)
{
arr = new int[size];
}
@laxmankumar2000
laxmankumar2000 / MergeSortExample.java
Created April 26, 2021 12:14
Error_In_Merge_Short
package Sortting.MergeSort;
public class MergeSortExample {
int arr[];
public MergeSortExample(int size)
{
arr = new int[size];
}
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,
class node {
int data;
node left;
node right;
public node(int data) {
this.data = data;
left = right = null;
}
class node {
int data;
node left;
node right;
public node(int data) {
this.data = data;
left = right = null;
}
@laxmankumar2000
laxmankumar2000 / Newclass.java
Created April 8, 2021 15:21
Linked_list trree
package Tree;
import Tree.BinaryTree.Node;
public class Newclass {
Tree.BinaryTree.Node root;