---
# System prepended metadata

title: Interview

---

# Interview
## Convolution

input feature: M x N matrix
kernel: k x k matrix, stride=S, padding='same' or 'valid'


```python
def convolution(input_matrix, kernel_matrix, padding):
    
    
    
    1, 2, 3     1, 0     1*1 + 2*1 + 3*1 = 6
    4, 5, 6  *  0, 1 = ?
    7, 8, 9
    
```



```python=
  prev 2 
  h   nxt
  1 -> 2 -> 3
  3 -> 2 -> 1


class Node:
    def __init__(self, value, next_):
        self.value = value
        self.next = next_

    
        
def reverse_list(head):
    prev = Node(None, None)
    BART
    
    while head:
        nxt = head.next
        head.next = prev
        prev = head
        head = nxt
    
    return prev
    
```

