Skip to content

Instantly share code, notes, and snippets.

View suessflorian's full-sized avatar

Florian Suess suessflorian

View GitHub Profile
@suessflorian
suessflorian / solution.py
Created August 16, 2022 05:48
Finding path problem
input = [['A', 'B'], ['B', 'C'], ['C', 'A'], ['B', 'D']]
def find_path(input):
if len(input) == 0:
return []
first = input.pop()
node = {
"path": [first],
// Given a length and the constraints, ie, length 4, numbers 1, uppercase 2, lowercase 1.
// Find the kth password that matches these constraints from lexical ordering standpoint.
// So in the case of k=4; the first four passwords on this lexical ordering would be
// 1AAa->1AAb->1AAc->1AAd and that last password is your answer.
// Just to highlight the lexical ordering a little more;
// note the last password possible here would be zZZ9).
function charToDecimal(char) {
const asciiRepresentation = char.charCodeAt(0);
const firstSymbolSetSize = "9".charCodeAt(0) - "0".charCodeAt(0) + 1;
import string
CONDITIONS = input()
[N, U, L] = [int(x) for x in CONDITIONS.split(" ")]
K_TH = int(input())
# this conversion here is used for easy sorting, 1, 2, 3 = L, U, N
BIGGEST_PERMU = list('1' * L + '2' * U + '3' * N)
def find_kth(current, k):
@suessflorian
suessflorian / .vimrc
Created August 19, 2019 20:51
Game changer
" reaching preferences
let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -l -g ""'
nnoremap <C-p> :Files<CR>
nnoremap <Leader>p :Fi <c-r><c-w><CR>
vnoremap <leader>p y:Fi <c-r>"<CR>
nnoremap <C-f> :Rg<space>
nnoremap <leader>f :Rg <c-r><c-w><CR>
vnoremap <leader>f y:Rg <c-r>"<CR>
@suessflorian
suessflorian / part1.md
Created March 16, 2018 04:37 — forked from vlandham/part1.md
Feature Branches and Pull Requests : Walkthrough

Here's a little walkthrough of how Yannick and I are using feature branches and pull requests to develop new features and adding them to the project. Below are the steps I take when working on a new feature. Hopefully this, along with watching the process on Github, will serve as a starting point to having everyone use a similar workflow.

Questions, comments, and suggestions for improvements welcome!

Start with the latest on master

When starting a new feature, I make sure to start with the latest and greatest codebase:

git checkout master