---
# System prepended metadata

title: Interview with Ching Yi

---

# Interview with Ching Yi

Test

## Algorithm

nums = [2,7,11,15], target = 9
[0,1]

nums = [3,2,4], target = 6
[1,2]

nums = [3,3], target = 6
[0,1]

(
    2 => 9 - 2 = 7
    (
        7
        11
        15
    )
)

```jsx=
function(nums, target) {
    //iterate through the nums
    for (let i = 0; i < nums.length; i++) {
        let findSomething = target - nums[i];
        for (let k = i + 1; k < nums.length; k++) {
            if (target == nums[k]) {
                return [i,k]
            }
        }
    }
}
```

## Frontend

![](https://i.imgur.com/2QnfOhU.png)


```
<div className={styles["cal-container"]}>
    <div className={styles["screen"]}>Screen</div>
    <div className={styles["btn-wrapper"]}>
        <button>1</button>
        <button>2</button>
        <button>3</button>
        <button>+</button>
    </div>
    <div className={styles["btn-wrapper"]}>
        <button>4</button>
        <button>5</button>
        <button>3</button>
        <button>+</button>
    </div>
    <div className={styles["btn-wrapper"]}>
        <button>7</button>
        <button>8</button>
        <button>9</button>
        <button>x</button>
    </div>
    <div className={styles["btn-wrapper"]}>
        <button>.</button>
        <button>0</button>
        <button>=</button>
        <button>/</button>
    </div>
</div>
```


```css=
.cal-container {
    display: flex;
    border: 1px solid black;
    justify-content: center;
}

.screen {
    display: flex;
    border: 1px solid black;
}

.btn-wrapper {
    display: flex;
    border: 1px solid black;
}
```