Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def jeffs_fav(w[1...n], q[1...k], delta, s_idx):
- w_states[1...n+2]
- w_states[1] = s_idx
- for i from 1 to n:
- w_states[i+1] = delta(w_states[i], w[i])
- w_states[n+2] = delta(w_states[n+2], null)
- for i from n+2 down to 2:
- if w_states[i] = s_idx and q[w_states[i - 1]] is False:
- return False
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement