---
# System prepended metadata

title: SUPRIYA SHANDILYA  (3+ yrs)

---

# SUPRIYA SHANDILYA  (3+ yrs)

- C++/python
- MongoDB (2 yrs before)


# Question 1: Find the 2nd max in an integer array.
```cpp==
// logic
// [-1, -2, 6, -4, -5, 6]

int secondMax(int arr[]){
  int first = 0;
  int second = -1;
  int n = arr.size();
  for(int i=1;i<n;i++){
      if(arr[i]> arr[first]){
          first = i;
      }
  }
  for(int i=0;i<n;i++){
      if(arr[i] != arr[first]){
          if(second == -1){
              second = i;
          }
          if(arr[i] > arr[second]){
              second = i;
          }
      }
  }
  return arr[second];
}

```


# Question 2: 

- Order is placed. After 2hrs , send sms/app notification.


4:29 -> 6:29

4:34 -> 6:34


# Question 3: 

large log file - TB


# Question 4: Find

[1, 6, 3, 2, 3, 1, 2, 3, 4, 2, 2]

maxWeight = 6

1. <=6
2. minimum number of smaller array. 
 
 
[1, 2, 3]   
[2, 3, 1]
[2, 3]
[4]
[5]
[2]

[1, 2]
[1]
[2]
[3]
[2]




 









