Skip to content

Instantly share code, notes, and snippets.

View karangoel16's full-sized avatar
🎯
Focusing

Karan Goel karangoel16

🎯
Focusing
View GitHub Profile
@karangoel16
karangoel16 / n_queen.cpp
Created October 26, 2016 20:32
this is a simple n-queen problem
#include <iostream>
#include <vector>
using namespace std;
vector<vector<int>>game;
int game_size;
bool isSafe(int row,int column)
{
int i,j;
bool isVowel(char c){
std::string check("aeiouAEIOU");
return check.find(c)!=std::string::npos;
}
@karangoel16
karangoel16 / colorUtils.kt
Last active October 15, 2022 02:57
ColorWithTransparency
fun String.toTransparentColor(num: Int): String {
return "#" + when (num) {
100 -> "FF"
99 -> "FC"
98 -> "FA"
97 -> "F7"
96 -> "F5"
95 -> "F2"
94 -> "F0"