Skip to content

Instantly share code, notes, and snippets.

View akshaykhanna's full-sized avatar
🧙
Coding Wiz

Akshay Khanna akshaykhanna

🧙
Coding Wiz
  • India
  • 18:19 (UTC +05:30)
View GitHub Profile
@akshaykhanna
akshaykhanna / backtracking_template.py
Created July 2, 2022 07:01 — forked from RuolinZheng08/backtracking_template.py
[Algo] Backtracking Template & N-Queens Solution
def is_valid_state(state):
# check if it is a valid solution
return True
def get_candidates(state):
return []
def search(state, solutions):
if is_valid_state(state):
solutions.append(state.copy())
@akshaykhanna
akshaykhanna / index.html
Created April 17, 2019 01:38
Tic Tac Toe
<div id="errors" style="
background: #c00;
color: #fff;
display: none;
margin: -20px -20px 20px;
padding: 20px;
white-space: pre-wrap;
"></div>
<div id="root"></div>
<script>