Given a reference of a node in a connected undirected graph.
Given an integer array nums, return true if there exists a triple of indices (i, j, k) such that i < j < k and nums[i] < nums[j] < nums[k]. If no such indices exists, return false.
nums
true
(i, j, k)
i < j < k
nums[i] < nums[j] < nums[k]
false
Example 1:
Input: nums =…
Given a string s, partition s such that every
s
substring
of the partition is a
palindrome
. Return all possible palindrome partitioning of s.