Skip to content

Instantly share code, notes, and snippets.

View poshan0126's full-sized avatar
🇳🇵
Focusing

Poshan Pandey poshan0126

🇳🇵
Focusing
View GitHub Profile
@poshan0126
poshan0126 / 8-Queen_problem
Created June 30, 2019 11:50
This Gist consist of a recursive iterative solution to the 8 Queen problem
def Permute(queens, row):
for i in range(8):
queens[row] = i
if Fine(queens, row):
if row == 7:
print(' ',queens)
globals()["solutions"] = globals()["solutions"] + 1
else:
Permute(queens, row+1)
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 29 20:26:05 2019
@author: Poshan Pandey
"""
# Python program to display the Fibonacci sequence up to n-th term using recursive functions
def recur_fibo(n):