Skip to content

Instantly share code, notes, and snippets.

View avvijeet's full-sized avatar

Avijeet Diwaker avvijeet

  • Skit.ai
  • India
View GitHub Profile
@junaid1460
junaid1460 / Bringing_Gun_To_a_Guard_Fight.py
Last active January 25, 2021 14:51
Google Foobar: Bringing a Gun to a Guard Fight
import math
def generate_dist_vector(size, start, tot_length, length):
tmp = [start]
count = 0
l, r = -length, tot_length - length
for i in range(size):
left = tmp[0]
right = tmp[count]
left += (l*2)
right += (r*2)