Skip to content

Instantly share code, notes, and snippets.

View lx93's full-sized avatar
👹
Not all those who wander are lost

Xiang Li lx93

👹
Not all those who wander are lost
  • MS CS @ University of San Francisco
  • San Francisco, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lx93 on github.
  • I am lx93 (https://keybase.io/lx93) on keybase.
  • I have a public key ASBDIxmX5NTXl9_hA199tH0xhK_IEuA8h1LgADZT08p4Zgo

To claim this, I am signing this object:

@lx93
lx93 / trim_arr.rb
Created September 8, 2017 19:55 — forked from imann24/trim_arr.rb
Trim a 2D array on a particular interval. Helper method for game of Mash
values = Array[["Charlie", "Dee", "Mac", "Dennis", "Frank"], ["Bar", "Bridge", "Van", "Submarine"], ["House", "Mansion"]]
interval = 11
def trim(array, interval)
running = true
interval_counter = 0
inner_pointer = 0
outer_pointer = 0
flags = Array.new(array.length, false)
while(running)