Skip to content

Instantly share code, notes, and snippets.

View arash-hacker's full-sized avatar
🐉
👾👺👹😈☠️🤖

arash-hacker

🐉
👾👺👹😈☠️🤖
View GitHub Profile
Maximum jump from reach end
    for i in range(1, n):
        jumps[i] = float('inf')
        for j in range(i):
            if (i <= j + arr[j]) and (jumps[j] != float('inf')):
                jumps[i] = min(jumps[i], jumps[j] + 1)
                break
    return jumps[n-1]
Coins minimum count problem
//#define TK2D_SLICING_ENABLED
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;
#endif