---
# System prepended metadata

title: Devesh Mehta

---

Devesh Mehta
https://drive.google.com/file/d/1QgSK1-kFfG_0YuJKP5koomUZAOC9AACZ/view

 - 7 yrs experienced
 - too slow in DSA
 - coding and logicals seems ok ok, but clearly not an expert in implementing and reaching proper solution
 - might be good at other aspects

1) Add digits
```
/**
 * @param {number} num
 * @return {number}
 */
var addDigits = function(num) {
    //var temp  = [...num.toString()];
    //console.log(temp)
    //console.log('test')
    if(num === 0) {
        return 0
    }
    var summedData =  splitNum(num);
    
    if(summedData > 10){
        return addDigits(summedData);
    } else {
        return summedData;
       // console.log(summedData);
    }
   // console.log(summedData);
};

var splitNum = function(num){
    var sumTotal = 0;
    //var splittedNum = '' +num;
    var splittedData  =  [...num.toString()];//splittedNum.split('');
    for(var i = 0; i<splittedData.length;i++) {
        //console.log(splittedData[i]);
        sumTotal = sumTotal + parseInt(splittedData[i]);
    }
    return sumTotal;
}
```

2) Plus one
```
/**
 * @param {number[]} digits
 * @return {number[]}
 */
var plusOne = function(digits) {
    //console.log(digits);
    var output = 0;
    console.log(digits.length);
    for(var i =0;i<digits.length;i++) {
        //console.log(digits[i]);
       // console.log(digits.length);
       var zeros;
       if(i ===  digits.length-1) {
           digits[i] = digits[i]+1;
           zeros = 1;
       }else{
       //console.log('power',10^2);
        zeros = Math.pow(10,digits.length -i-1);
       }

        output = output + digits[i]*zeros;
        console.log(output, digits[i], digits.length-i-1,i);
        //console.log(digits[i],output, zeros);
    }
    //console.log(output);
    var finalOutput = output.toString().split('');
    console.log(finalOutput);
    return finalOutput;
    //return output;
};
```

3) experience in event driven system
 - explained 1 usecase
 - worked with kafka