---
# System prepended metadata

title: Akshay

---

# Akshay

# Question 1: Python
- Find the all duplicate elements from an array. 
```python!

list = [1, 1, 2, 2, 3, 3]

ans [1, 2, 3]

def is_dup(arr):
    list = []
    for i in len(arr):
        cnt = 0
        if arr[i] in arr:
            cnt += 1
            if cnt > 1:
                return list.append(arr)
            else
                return None
        else
            return None
    


```
- Find the max sum in an array
    - pick Every ith index number,cannot pick i-1th index number and i+1th index number. 
[1, 2, 3, 4, 5] - 9
[1, 2,-3, 4, 5] - 7
```python!

def max_sum(arr):
    sum = 0
    for i in len(arr):
        # if arr[i-1] or arr[i+1]
        for j in len(arr):
            sum + = arr[i]
        




```