Skip to content

Instantly share code, notes, and snippets.

@burdoto
Last active December 22, 2018 11:53
Show Gist options
  • Select an option

  • Save burdoto/b91a04ea57b17e54c1b12d015e902da1 to your computer and use it in GitHub Desktop.

Select an option

Save burdoto/b91a04ea57b17e54c1b12d015e902da1 to your computer and use it in GitHub Desktop.
Probably the smartest WHILE ever created.
int n = -1, o = 0;
while (n++ < nw.length)
if (n == ind) nw[n + o++ - 1] = insert;
else nw[n] = origin[n + o];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment