Monday, March 1, 2021
More
    Home Tags Optimization

    Optimization

    Check Same Binary Tree

    Check Same Binary Tree Question: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if...

    Customers Who Never Order

    Suppose that a website contains two tables, the tableCustomers and the tableOrders. Write a SQL query to find all customers who never order anything. Table:...

    Employees Earning More Than Their Managers

    The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id. +----+-------+--------+-----------+ |...

    Delete Duplicate Emails

    Write a SQL query to delete all duplicate email entries in a table named,Person keeping only unique emails based on its smallestId. +----+------------------+ | Id | Email...

    Rising Temperature

    Given a Weather table, write a SQL query to find all dates' Ids with higher temperature compared to its previous (yesterday's) dates. +---------+------------+------------------+ | Id(INT) | Date(DATE) |...

    Department Highest Salary

    The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id. +----+-------+--------+--------------+ | Id | Name...

    Nth Highest Salary

    Write a SQL query to get the nth highest salary from the Employee table. +----+--------+ | Id | Salary | +----+--------+ | 1 | 100 | | 2 ...

    Must Read