bowang0911/leetcode huggingface dataset:
Minimum Cost to Reach City With Discounts

A series of highways connect `n` cities numbered from `0` to `n - 1`. You are given a 2D integer array `highways` where `highways[i] = [city1i, city2i, tolli]` indicates that there is a highway that connects `city1i` and `city2i`, allowing a car to go from `city1i` to `city2i` **and vice versa** for a cost of `tolli`.

You are also given an integer `discounts` which represents the number of discounts you have. You can use a discount to travel across the `ith` highway for a cost of `tolli / 2` (**integer** **division**). Each discount may only be used **once**, and you can only use at most **one** discount per highway.

Return _the **minimum total cost** to go from city_ `0` _to city_ `n - 1`_, or_ `-1` _if it is not possible to go from city_ `0` _to city_ `n - 1`_._

**Example 1:**  

**Input:** n = 5, highways = \[\[0,1,4\],\[2,1,3\],\[1,4,11\],\[3,2,3\],\[3,4,2\]\], discounts = 1
**Output:** 9
**Explanation:**
Go from 0 to 1 for a cost of 4.
Go from 1 to 4 and use a discount for a cost of 11 / 2 = 5.
The minimum cost to go from 0 to 4 is 4 + 5 = 9.

**Example 2:**  

**Input:** n = 4, highways = \[\[1,3,17\],\[1,2,7\],\[3,2,5\],\[0,1,6\],\[3,0,20\]\], discounts = 20
**Output:** 8
**Explanation:**
Go from 0 to 1 and use a discount for a cost of 6 / 2 = 3.
Go from 1 to 2 and use a discount for a cost of 7 / 2 = 3.
Go from 2 to 3 and use a discount for a cost of 5 / 2 = 2.
The minimum cost to go from 0 to 3 is 3 + 3 + 2 = 8.

**Example 3:**  

**Input:** n = 4, highways = \[\[0,1,3\],\[2,3,2\]\], discounts = 0
**Output:** -1
**Explanation:**
It is impossible to go from 0 to 3 so return -1.

**Constraints:**

*   `2 <= n <= 1000`
*   `1 <= highways.length <= 1000`
*   `highways[i].length == 3`
*   `0 <= city1i, city2i <= n - 1`
*   `city1i != city2i`
*   `0 <= tolli <= 105`
*   `0 <= discounts <= 500`
*   There are no duplicate highways.
Finding 3-Digit Even Numbers

You are given an integer array `digits`, where each element is a digit. The array may contain duplicates.

You need to find **all** the **unique** integers that follow the given requirements:

*   The integer consists of the **concatenation** of **three** elements from `digits` in **any** arbitrary order.
*   The integer does not have **leading zeros**.
*   The integer is **even**.

For example, if the given `digits` were `[1, 2, 3]`, integers `132` and `312` follow the requirements.

Return _a **sorted** array of the unique integers._

**Example 1:**

**Input:** digits = \[2,1,3,0\]
**Output:** \[102,120,130,132,210,230,302,310,312,320\]
**Explanation:** All the possible integers that follow the requirements are in the output array. 
Notice that there are no **odd** integers or integers with **leading zeros**.

**Example 2:**

**Input:** digits = \[2,2,8,8,2\]
**Output:** \[222,228,282,288,822,828,882\]
**Explanation:** The same digit can be used as many times as it appears in digits. 
In this example, the digit 8 is used twice each time in 288, 828, and 882. 

**Example 3:**

**Input:** digits = \[3,7,5\]
**Output:** \[\]
**Explanation:** No **even** integers can be formed using the given digits.

**Constraints:**

*   `3 <= digits.length <= 100`
*   `0 <= digits[i] <= 9`
Delete the Middle Node of a Linked List

You are given the `head` of a linked list. **Delete** the **middle node**, and return _the_ `head` _of the modified linked list_.

The **middle node** of a linked list of size `n` is the `⌊n / 2⌋th` node from the **start** using **0-based indexing**, where `⌊x⌋` denotes the largest integer less than or equal to `x`.

*   For `n` = `1`, `2`, `3`, `4`, and `5`, the middle nodes are `0`, `1`, `1`, `2`, and `2`, respectively.

**Example 1:**

**Input:** head = \[1,3,4,7,1,2,6\]
**Output:** \[1,3,4,1,2,6\]
**Explanation:**
The above figure represents the given linked list. The indices of the nodes are written below.
Since n = 7, node 3 with value 7 is the middle node, which is marked in red.
We return the new list after removing this node. 

**Example 2:**

**Input:** head = \[1,2,3,4\]
**Output:** \[1,2,4\]
**Explanation:**
The above figure represents the given linked list.
For n = 4, node 2 with value 3 is the middle node, which is marked in red.

**Example 3:**

**Input:** head = \[2,1\]
**Output:** \[2\]
**Explanation:**
The above figure represents the given linked list.
For n = 2, node 1 with value 1 is the middle node, which is marked in red.
Node 0 with value 2 is the only node remaining after removing node 1.

**Constraints:**

*   The number of nodes in the list is in the range `[1, 105]`.
*   `1 <= Node.val <= 105`
Step-By-Step Directions From a Binary Tree Node to Another

You are given the `root` of a **binary tree** with `n` nodes. Each node is uniquely assigned a value from `1` to `n`. You are also given an integer `startValue` representing the value of the start node `s`, and a different integer `destValue` representing the value of the destination node `t`.

Find the **shortest path** starting from node `s` and ending at node `t`. Generate step-by-step directions of such path as a string consisting of only the **uppercase** letters `'L'`, `'R'`, and `'U'`. Each letter indicates a specific direction:

*   `'L'` means to go from a node to its **left child** node.
*   `'R'` means to go from a node to its **right child** node.
*   `'U'` means to go from a node to its **parent** node.

Return _the step-by-step directions of the **shortest path** from node_ `s` _to node_ `t`.

**Example 1:**

**Input:** root = \[5,1,2,3,null,6,4\], startValue = 3, destValue = 6
**Output:**  "UURL "
**Explanation:** The shortest path is: 3 -> 1 -> 5 -> 2 -> 6.

**Example 2:**

**Input:** root = \[2,1\], startValue = 2, destValue = 1
**Output:**  "L "
**Explanation:** The shortest path is: 2 -> 1.

**Constraints:**

*   The number of nodes in the tree is `n`.
*   `2 <= n <= 105`
*   `1 <= Node.val <= n`
*   All the values in the tree are **unique**.
*   `1 <= startValue, destValue <= n`
*   `startValue != destValue`
Valid Arrangement of Pairs

You are given a **0-indexed** 2D integer array `pairs` where `pairs[i] = [starti, endi]`. An arrangement of `pairs` is **valid** if for every index `i` where `1 <= i < pairs.length`, we have `endi-1 == starti`.

Return _**any** valid arrangement of_ `pairs`.

**Note:** The inputs will be generated such that there exists a valid arrangement of `pairs`.

**Example 1:**

**Input:** pairs = \[\[5,1\],\[4,5\],\[11,9\],\[9,4\]\]
**Output:** \[\[11,9\],\[9,4\],\[4,5\],\[5,1\]\]
**Explanation:**
This is a valid arrangement since endi-1 always equals starti.
end0 = 9 == 9 = start1 
end1 = 4 == 4 = start2
end2 = 5 == 5 = start3

**Example 2:**

**Input:** pairs = \[\[1,3\],\[3,2\],\[2,1\]\]
**Output:** \[\[1,3\],\[3,2\],\[2,1\]\]
**Explanation:**
This is a valid arrangement since endi-1 always equals starti.
end0 = 3 == 3 = start1
end1 = 2 == 2 = start2
The arrangements \[\[2,1\],\[1,3\],\[3,2\]\] and \[\[3,2\],\[2,1\],\[1,3\]\] are also valid.

**Example 3:**

**Input:** pairs = \[\[1,2\],\[1,3\],\[2,1\]\]
**Output:** \[\[1,2\],\[2,1\],\[1,3\]\]
**Explanation:**
This is a valid arrangement since endi-1 always equals starti.
end0 = 2 == 2 = start1
end1 = 1 == 1 = start2

**Constraints:**

*   `1 <= pairs.length <= 105`
*   `pairs[i].length == 2`
*   `0 <= starti, endi <= 109`
*   `starti != endi`
*   No two pairs are exactly the same.
*   There **exists** a valid arrangement of `pairs`.
Subsequence of Size K With the Largest Even Sum

You are given an integer array `nums` and an integer `k`. Find the **largest even sum** of any subsequence of `nums` that has a length of `k`.

Return _this sum, or_ `-1` _if such a sum does not exist_.

A **subsequence** is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements.

**Example 1:**

**Input:** nums = \[4,1,5,3,1\], k = 3
**Output:** 12
**Explanation:**
The subsequence with the largest possible even sum is \[4,5,3\]. It has a sum of 4 + 5 + 3 = 12.

**Example 2:**

**Input:** nums = \[4,6,2\], k = 3
**Output:** 12
**Explanation:**
The subsequence with the largest possible even sum is \[4,6,2\]. It has a sum of 4 + 6 + 2 = 12.

**Example 3:**

**Input:** nums = \[1,3,5\], k = 1
**Output:** -1
**Explanation:**
No subsequence of nums with length 1 has an even sum.

**Constraints:**

*   `1 <= nums.length <= 105`
*   `0 <= nums[i] <= 105`
*   `1 <= k <= nums.length`
Find Subsequence of Length K With the Largest Sum

You are given an integer array `nums` and an integer `k`. You want to find a **subsequence** of `nums` of length `k` that has the **largest** sum.

Return _**any** such subsequence as an integer array of length_ `k`.

A **subsequence** is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements.

**Example 1:**

**Input:** nums = \[2,1,3,3\], k = 2
**Output:** \[3,3\]
**Explanation:**
The subsequence has the largest sum of 3 + 3 = 6.

**Example 2:**

**Input:** nums = \[-1,-2,3,4\], k = 3
**Output:** \[-1,3,4\]
**Explanation:** 
The subsequence has the largest sum of -1 + 3 + 4 = 6.

**Example 3:**

**Input:** nums = \[3,4,3,3\], k = 2
**Output:** \[3,4\]
**Explanation:**
The subsequence has the largest sum of 3 + 4 = 7. 
Another possible subsequence is \[4, 3\].

**Constraints:**

*   `1 <= nums.length <= 1000`
*   `-105 <= nums[i] <= 105`
*   `1 <= k <= nums.length`
Find Good Days to Rob the Bank

You and a gang of thieves are planning on robbing a bank. You are given a **0-indexed** integer array `security`, where `security[i]` is the number of guards on duty on the `ith` day. The days are numbered starting from `0`. You are also given an integer `time`.

The `ith` day is a good day to rob the bank if:

*   There are at least `time` days before and after the `ith` day,
*   The number of guards at the bank for the `time` days **before** `i` are **non-increasing**, and
*   The number of guards at the bank for the `time` days **after** `i` are **non-decreasing**.

More formally, this means day `i` is a good day to rob the bank if and only if `security[i - time] >= security[i - time + 1] >= ... >= security[i] <= ... <= security[i + time - 1] <= security[i + time]`.

Return _a list of **all** days **(0-indexed)** that are good days to rob the bank_. _The order that the days are returned in does **not** matter._

**Example 1:**

**Input:** security = \[5,3,3,3,5,6,2\], time = 2
**Output:** \[2,3\]
**Explanation:**
On day 2, we have security\[0\] >= security\[1\] >= security\[2\] <= security\[3\] <= security\[4\].
On day 3, we have security\[1\] >= security\[2\] >= security\[3\] <= security\[4\] <= security\[5\].
No other days satisfy this condition, so days 2 and 3 are the only good days to rob the bank.

**Example 2:**

**Input:** security = \[1,1,1,1,1\], time = 0
**Output:** \[0,1,2,3,4\]
**Explanation:**
Since time equals 0, every day is a good day to rob the bank, so return every day.

**Example 3:**

**Input:** security = \[1,2,3,4,5,6\], time = 2
**Output:** \[\]
**Explanation:**
No day has 2 days before it that have a non-increasing number of guards.
Thus, no day is a good day to rob the bank, so return an empty list.

**Constraints:**

*   `1 <= security.length <= 105`
*   `0 <= security[i], time <= 105`
Detonate the Maximum Bombs

You are given a list of bombs. The **range** of a bomb is defined as the area where its effect can be felt. This area is in the shape of a **circle** with the center as the location of the bomb.

The bombs are represented by a **0-indexed** 2D integer array `bombs` where `bombs[i] = [xi, yi, ri]`. `xi` and `yi` denote the X-coordinate and Y-coordinate of the location of the `ith` bomb, whereas `ri` denotes the **radius** of its range.

You may choose to detonate a **single** bomb. When a bomb is detonated, it will detonate **all bombs** that lie in its range. These bombs will further detonate the bombs that lie in their ranges.

Given the list of `bombs`, return _the **maximum** number of bombs that can be detonated if you are allowed to detonate **only one** bomb_.

**Example 1:**

**Input:** bombs = \[\[2,1,3\],\[6,1,4\]\]
**Output:** 2
**Explanation:**
The above figure shows the positions and ranges of the 2 bombs.
If we detonate the left bomb, the right bomb will not be affected.
But if we detonate the right bomb, both bombs will be detonated.
So the maximum bombs that can be detonated is max(1, 2) = 2.

**Example 2:**

**Input:** bombs = \[\[1,1,5\],\[10,10,5\]\]
**Output:** 1
**Explanation:**
Detonating either bomb will not detonate the other bomb, so the maximum number of bombs that can be detonated is 1.

**Example 3:**

**Input:** bombs = \[\[1,2,3\],\[2,3,1\],\[3,4,2\],\[4,5,3\],\[5,6,4\]\]
**Output:** 5
**Explanation:**
The best bomb to detonate is bomb 0 because:
- Bomb 0 detonates bombs 1 and 2. The red circle denotes the range of bomb 0.
- Bomb 2 detonates bomb 3. The blue circle denotes the range of bomb 2.
- Bomb 3 detonates bomb 4. The green circle denotes the range of bomb 3.
Thus all 5 bombs are detonated.

**Constraints:**

*   `1 <= bombs.length <= 100`
*   `bombs[i].length == 3`
*   `1 <= xi, yi, ri <= 105`
Rings and Rods

There are `n` rings and each ring is either red, green, or blue. The rings are distributed **across ten rods** labeled from `0` to `9`.

You are given a string `rings` of length `2n` that describes the `n` rings that are placed onto the rods. Every two characters in `rings` forms a **color-position pair** that is used to describe each ring where:

*   The **first** character of the `ith` pair denotes the `ith` ring's **color** (`'R'`, `'G'`, `'B'`).
*   The **second** character of the `ith` pair denotes the **rod** that the `ith` ring is placed on (`'0'` to `'9'`).

For example, `"R3G2B1 "` describes `n == 3` rings: a red ring placed onto the rod labeled 3, a green ring placed onto the rod labeled 2, and a blue ring placed onto the rod labeled 1.

Return _the number of rods that have **all three colors** of rings on them._

**Example 1:**

**Input:** rings =  "B0B6G0R6R0R6G9 "
**Output:** 1
**Explanation:** 
- The rod labeled 0 holds 3 rings with all colors: red, green, and blue.
- The rod labeled 6 holds 3 rings, but it only has red and blue.
- The rod labeled 9 holds only a green ring.
Thus, the number of rods with all three colors is 1.

**Example 2:**

**Input:** rings =  "B0R0G0R9R0B0G0 "
**Output:** 1
**Explanation:** 
- The rod labeled 0 holds 6 rings with all colors: red, green, and blue.
- The rod labeled 9 holds only a red ring.
Thus, the number of rods with all three colors is 1.

**Example 3:**

**Input:** rings =  "G4 "
**Output:** 0
**Explanation:** 
Only one ring is given. Thus, no rods have all three colors.

**Constraints:**

*   `rings.length == 2 * n`
*   `1 <= n <= 100`
*   `rings[i]` where `i` is **even** is either `'R'`, `'G'`, or `'B'` (**0-indexed**).
*   `rings[i]` where `i` is **odd** is a digit from `'0'` to `'9'` (**0-indexed**).
Sum of Subarray Ranges

You are given an integer array `nums`. The **range** of a subarray of `nums` is the difference between the largest and smallest element in the subarray.

Return _the **sum of all** subarray ranges of_ `nums`_._

A subarray is a contiguous **non-empty** sequence of elements within an array.

**Example 1:**

**Input:** nums = \[1,2,3\]
**Output:** 4
**Explanation:** The 6 subarrays of nums are the following:
\[1\], range = largest - smallest = 1 - 1 = 0 
\[2\], range = 2 - 2 = 0
\[3\], range = 3 - 3 = 0
\[1,2\], range = 2 - 1 = 1
\[2,3\], range = 3 - 2 = 1
\[1,2,3\], range = 3 - 1 = 2
So the sum of all ranges is 0 + 0 + 0 + 1 + 1 + 2 = 4.

**Example 2:**

**Input:** nums = \[1,3,3\]
**Output:** 4
**Explanation:** The 6 subarrays of nums are the following:
\[1\], range = largest - smallest = 1 - 1 = 0
\[3\], range = 3 - 3 = 0
\[3\], range = 3 - 3 = 0
\[1,3\], range = 3 - 1 = 2
\[3,3\], range = 3 - 3 = 0
\[1,3,3\], range = 3 - 1 = 2
So the sum of all ranges is 0 + 0 + 0 + 2 + 0 + 2 = 4.

**Example 3:**

**Input:** nums = \[4,-2,-3,4,1\]
**Output:** 59
**Explanation:** The sum of all subarray ranges of nums is 59.

**Constraints:**

*   `1 <= nums.length <= 1000`
*   `-109 <= nums[i] <= 109`

**Follow-up:** Could you find a solution with `O(n)` time complexity?
Watering Plants II

Alice and Bob want to water `n` plants in their garden. The plants are arranged in a row and are labeled from `0` to `n - 1` from left to right where the `ith` plant is located at `x = i`.

Each plant needs a specific amount of water. Alice and Bob have a watering can each, **initially full**. They water the plants in the following way:

*   Alice waters the plants in order from **left to right**, starting from the `0th` plant. Bob waters the plants in order from **right to left**, starting from the `(n - 1)th` plant. They begin watering the plants **simultaneously**.
*   It takes the same amount of time to water each plant regardless of how much water it needs.
*   Alice/Bob **must** water the plant if they have enough in their can to **fully** water it. Otherwise, they **first** refill their can (instantaneously) then water the plant.
*   In case both Alice and Bob reach the same plant, the one with **more** water currently in his/her watering can should water this plant. If they have the same amount of water, then Alice should water this plant.

Given a **0-indexed** integer array `plants` of `n` integers, where `plants[i]` is the amount of water the `ith` plant needs, and two integers `capacityA` and `capacityB` representing the capacities of Alice's and Bob's watering cans respectively, return _the **number of times** they have to refill to water all the plants_.

**Example 1:**

**Input:** plants = \[2,2,3,3\], capacityA = 5, capacityB = 5
**Output:** 1
**Explanation:**
- Initially, Alice and Bob have 5 units of water each in their watering cans.
- Alice waters plant 0, Bob waters plant 3.
- Alice and Bob now have 3 units and 2 units of water respectively.
- Alice has enough water for plant 1, so she waters it. Bob does not have enough water for plant 2, so he refills his can then waters it.
So, the total number of times they have to refill to water all the plants is 0 + 0 + 1 + 0 = 1.

**Example 2:**

**Input:** plants = \[2,2,3,3\], capacityA = 3, capacityB = 4
**Output:** 2
**Explanation:**
- Initially, Alice and Bob have 3 units and 4 units of water in their watering cans respectively.
- Alice waters plant 0, Bob waters plant 3.
- Alice and Bob now have 1 unit of water each, and need to water plants 1 and 2 respectively.
- Since neither of them have enough water for their current plants, they refill their cans and then water the plants.
So, the total number of times they have to refill to water all the plants is 0 + 1 + 1 + 0 = 2.

**Example 3:**

**Input:** plants = \[5\], capacityA = 10, capacityB = 8
**Output:** 0
**Explanation:**
- There is only one plant.
- Alice's watering can has 10 units of water, whereas Bob's can has 8 units. Since Alice has more water in her can, she waters this plant.
So, the total number of times they have to refill is 0.

**Constraints:**

*   `n == plants.length`
*   `1 <= n <= 105`
*   `1 <= plants[i] <= 106`
*   `max(plants[i]) <= capacityA, capacityB <= 109`
Maximum Fruits Harvested After at Most K Steps

Fruits are available at some positions on an infinite x-axis. You are given a 2D integer array `fruits` where `fruits[i] = [positioni, amounti]` depicts `amounti` fruits at the position `positioni`. `fruits` is already **sorted** by `positioni` in **ascending order**, and each `positioni` is **unique**.

You are also given an integer `startPos` and an integer `k`. Initially, you are at the position `startPos`. From any position, you can either walk to the **left or right**. It takes **one step** to move **one unit** on the x-axis, and you can walk **at most** `k` steps in total. For every position you reach, you harvest all the fruits at that position, and the fruits will disappear from that position.

Return _the **maximum total number** of fruits you can harvest_.

**Example 1:**

**Input:** fruits = \[\[2,8\],\[6,3\],\[8,6\]\], startPos = 5, k = 4
**Output:** 9
**Explanation:** 
The optimal way is to:
- Move right to position 6 and harvest 3 fruits
- Move right to position 8 and harvest 6 fruits
You moved 3 steps and harvested 3 + 6 = 9 fruits in total.

**Example 2:**

**Input:** fruits = \[\[0,9\],\[4,1\],\[5,7\],\[6,2\],\[7,4\],\[10,9\]\], startPos = 5, k = 4
**Output:** 14
**Explanation:** 
You can move at most k = 4 steps, so you cannot reach position 0 nor 10.
The optimal way is to:
- Harvest the 7 fruits at the starting position 5
- Move left to position 4 and harvest 1 fruit
- Move right to position 6 and harvest 2 fruits
- Move right to position 7 and harvest 4 fruits
You moved 1 + 3 = 4 steps and harvested 7 + 1 + 2 + 4 = 14 fruits in total.

**Example 3:**

**Input:** fruits = \[\[0,3\],\[6,4\],\[8,5\]\], startPos = 3, k = 2
**Output:** 0
**Explanation:**
You can move at most k = 2 steps and cannot reach any position with fruits.

**Constraints:**

*   `1 <= fruits.length <= 105`
*   `fruits[i].length == 2`
*   `0 <= startPos, positioni <= 2 * 105`
*   `positioni-1 < positioni` for any `i > 0` (**0-indexed**)
*   `1 <= amounti <= 104`
*   `0 <= k <= 2 * 105`
Number of Unique Flavors After Sharing K Candies

You are given a **0-indexed** integer array `candies`, where `candies[i]` represents the flavor of the `ith` candy. Your mom wants you to share these candies with your little sister by giving her `k` **consecutive** candies, but you want to keep as many flavors of candies as possible.

Return _the **maximum** number of **unique** flavors of candy you can keep after sharing_ _with your sister._

**Example 1:**

**Input:** candies = \[1,2,2,3,4,3\], k = 3
**Output:** 3
**Explanation:** 
Give the candies in the range \[1, 3\] (inclusive) with flavors \[2,2,3\].
You can eat candies with flavors \[1,4,3\].
There are 3 unique flavors, so return 3.

**Example 2:**

**Input:** candies = \[2,2,2,2,3,3\], k = 2
**Output:** 2
**Explanation:** 
Give the candies in the range \[3, 4\] (inclusive) with flavors \[2,3\].
You can eat candies with flavors \[2,2,2,3\].
There are 2 unique flavors, so return 2.
Note that you can also share the candies with flavors \[2,2\] and eat the candies with flavors \[2,2,3,3\].

**Example 3:**

**Input:** candies = \[2,4,5\], k = 0
**Output:** 3
**Explanation:** 
You do not have to give any candies.
You can eat the candies with flavors \[2,4,5\].
There are 3 unique flavors, so return 3.

**Constraints:**

*   `1 <= candies.length <= 105`
*   `1 <= candies[i] <= 105`
*   `0 <= k <= candies.length`
Find First Palindromic String in the Array

Given an array of strings `words`, return _the first **palindromic** string in the array_. If there is no such string, return _an **empty string**_ `" "`.

A string is **palindromic** if it reads the same forward and backward.

**Example 1:**

**Input:** words = \[ "abc ", "car ", "ada ", "racecar ", "cool "\]
**Output:**  "ada "
**Explanation:** The first string that is palindromic is  "ada ".
Note that  "racecar " is also palindromic, but it is not the first.

**Example 2:**

**Input:** words = \[ "notapalindrome ", "racecar "\]
**Output:**  "racecar "
**Explanation:** The first and only string that is palindromic is  "racecar ".

**Example 3:**

**Input:** words = \[ "def ", "ghi "\]
**Output:**  " "
**Explanation:** There are no palindromic strings, so the empty string is returned.

**Constraints:**

*   `1 <= words.length <= 100`
*   `1 <= words[i].length <= 100`
*   `words[i]` consists only of lowercase English letters.