#3115

Maximum Prime Difference

specialist · 750 · lc medium +31 · 58.6% accepted · 125 likes · top 55%

Description

Given an integer array nums, return the largest index gap between any two prime-valued elements in nums (the two elements may share the same value).

Code

1
2
3