This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define TK2D_SLICING_ENABLED | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif |