public class Solution { public int LargestPalindrome(int n) { ) ; , n) - ; ; v > max / ; v--) { StringBuilder sb = new StringBuilder(); foreach (var c in v.ToString().Reverse()) { sb.Append(c); } long u = Convert.ToInt64(v.ToString() + sb.ToString())…