분류 전체보기

    617 Merge Two Binary Trees

    617 Merge Two Binary Trees

    1. Description You are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to merge two trees into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the Not null node will be used as the n..

    607 Sales Person

    607 Sales Person

    1. Description Table: SalesPerson +-----------------+---------+ | Column Name | Type | +-----------------+---------+ | sales_id | int | | name | varchar | | salary | int | | commission_rate | int | | hire_date | date | +-----------------+---------+ sales_id is the primary key column for this table. Each row of this table indicates the name and the ID of a salesperson alongside their salary, comm..

    599 Minimum Index Sum of Two Lists

    599 Minimum Index Sum of Two Lists

    1. Description Given two arrays of strings list1 and list2, find the common strings with the least index sum. A common string is a string that appeared in both list1 and list2. A common string with the least index sum is a common string such that if it appeared at list1[i] and list2[j] then i + j should be the minimum value among all the other common strings. Return all the common strings with t..

    589 Range Addition II

    589 Range Addition II

    1. Description You are given an \(m \times n\) matrix M initialized with all 0's and an array of operations ops, where \(ops[i] = [a_i, b_i]\) means M[x][y] should be incremented by one for all \(0