Data

Find the Largest Sum of Consecutive Integers in an Array
AskAI

Given an array of integers, this problem seeks to find the largest sum of consecutive integers in the array. For example, in the array [2, 3, -5, 7, 8 ], the largest sum of consecutive integers is 15 (2 + 3 + 7 + 8).

SQL Query to Find All Rows in TableA with Corresponding Row in Table B
AskAI

Write a SQL query to find all rows in TableA that have a corresponding row in TableB.

220
Mar 08
Get all products in the Electronics category
AskAI

This technical problem deals with writing a SQL query to join two tables and return the names of all products in a given category. In the example given, the category is "Electronics" and the products returned are "TV" and "Phone".

156
Mar 07
Array Sum
AskAI

This technical problem deals with finding the sum of the elements in an array. An example input is given, as well as the expected output.

Get total number of orders for each user
AskAI

Given two tables - "users" and "orders" - write a SQL query to find the total number of orders for each user.

195
Mar 07
Longest Increasing Subsequence
AskAI

This problem is about finding the longest increasing subsequence in an array of integers.

Get customer name, city, and order total from Customers and Orders tables
AskAI

Write a SQL query to return the customer name, customer city, and the total amount spent by the customer on orders, given two tables - Customers and Orders.

221
Mar 07
Longest Common Prefix in an Array of Strings
AskAI

This problem asks you to find the longest common prefix among an array of strings. This can be done by comparing the first characters of each string, then the second characters of each string, and so on until a difference is found or the end of the shortest string is reached.