From ef9bd6467e70e02673b60d12db3440d967c37335 Mon Sep 17 00:00:00 2001 From: Dimple Kumari <114878264+Dimple-01@users.noreply.github.com> Date: Thu, 13 Jun 2024 23:52:56 +0530 Subject: [PATCH] Added README.md file for Biggest Single Number --- 619-biggest-single-number/README.md | 72 +++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 619-biggest-single-number/README.md diff --git a/619-biggest-single-number/README.md b/619-biggest-single-number/README.md new file mode 100644 index 0000000..404fd59 --- /dev/null +++ b/619-biggest-single-number/README.md @@ -0,0 +1,72 @@ +

Biggest Single Number

Difficulty: Easy

Table: MyNumbers

+ +
++-------------+------+
+| Column Name | Type |
++-------------+------+
+| num         | int  |
++-------------+------+
+This table may contain duplicates (In other words, there is no primary key for this table in SQL).
+Each row of this table contains an integer.
+
+ +

 

+ +

A single number is a number that appeared only once in the MyNumbers table.

+ +

Find the largest single number. If there is no single number, report null.

+ +

The result format is in the following example.

+ +

 

+

Example 1:

+ +
+Input: 
+MyNumbers table:
++-----+
+| num |
++-----+
+| 8   |
+| 8   |
+| 3   |
+| 3   |
+| 1   |
+| 4   |
+| 5   |
+| 6   |
++-----+
+Output: 
++-----+
+| num |
++-----+
+| 6   |
++-----+
+Explanation: The single numbers are 1, 4, 5, and 6.
+Since 6 is the largest single number, we return it.
+
+ +

Example 2:

+ +
+Input: 
+MyNumbers table:
++-----+
+| num |
++-----+
+| 8   |
+| 8   |
+| 7   |
+| 7   |
+| 3   |
+| 3   |
+| 3   |
++-----+
+Output: 
++------+
+| num  |
++------+
+| null |
++------+
+Explanation: There are no single numbers in the input table so we return null.
+