Browser tab content: Problem List
0
Debugging...
Run
Submit
00:00:00
Description
Editorial
Editorial
Solutions
Solutions
Submissions
Submissions
Code
Note
Note
Testcase
Testcase
Test Result
479. Largest Palindrome Product
Hard
Topics
Companies

Given an integer n, return the largest palindromic integer that can be represented as the product of two n-digits integers. Since the answer can be very large, return it modulo 1337.

 

Example 1:

Input: n = 2
Output: 987
Explanation: 99 x 91 = 9009, 9009 % 1337 = 987


Example 2:

Input: n = 1
Output: 9


 

Constraints:

1 <= n <= 8
Seen this question in a real interview before?
1/5
Yes
No
Accepted
25.9K
Submissions
76.3K
Acceptance Rate
34.0%
Topics
Math
Enumeration
Companies
0 - 6 months
Yahoo
2
Discussion (6)
Choose a type
Preview
Comment
💡 Discussion Rules

1. Please don't post any solutions in this discussion.

2. The problem discussion is for asking questions about the problem or for sharing tips - anything except for solutions.

3. If you'd like to share your solution for feedback and ideas, please head to the solutions tab and post it there.

Sort by:Best
No comments yet.
1
Copyright ©️ 2024 LeetCode All rights reserved
177
6
Java
Auto
1
2
3
4
5
class Solution {
    public int largestPalindrome(int n) {
        
    }
}
Saved
Ln 1, Col 1
You must run your code first

Third Maximum Number - LeetCode

Problem List
Tag
405. Convert a Number to Hexadecimal

Easy

406. Queue Reconstruction by Height

Med.

407. Trapping Rain Water II

Hard

408. Valid Word Abbreviation

Easy

409. Longest Palindrome

Easy

410. Split Array Largest Sum

Hard

411. Minimum Unique Word Abbreviation

Hard

412. Fizz Buzz

Easy

413. Arithmetic Slices

Med.

414. Third Maximum Number

Easy

415. Add Strings

Easy

416. Partition Equal Subset Sum

Med.

417. Pacific Atlantic Water Flow

Med.

418. Sentence Screen Fitting

Med.

419. Battleships in a Board

Med.

420. Strong Password Checker

Hard

421. Maximum XOR of Two Numbers in an Array

Med.

422. Valid Word Square

Easy

423. Reconstruct Original Digits from English

Med.

424. Longest Repeating Character Replacement

Med.

425. Word Squares

Hard

426. Convert Binary Search Tree to Sorted Doubly Linked List

Med.

427. Construct Quad Tree

Med.

428. Serialize and Deserialize N-ary Tree

Hard

429. N-ary Tree Level Order Traversal

Med.

430. Flatten a Multilevel Doubly Linked List

Med.

431. Encode N-ary Tree to Binary Tree

Hard

432. All O`one Data Structure

Hard

433. Minimum Genetic Mutation

Med.

434. Number of Segments in a String

Easy

435. Non-overlapping Intervals

Med.

436. Find Right Interval

Med.

437. Path Sum III

Med.

438. Find All Anagrams in a String

Med.

439. Ternary Expression Parser

Med.

440. K-th Smallest in Lexicographical Order

Hard

441. Arranging Coins

Easy

442. Find All Duplicates in an Array

Med.

443. String Compression

Med.

444. Sequence Reconstruction

Med.

445. Add Two Numbers II

Med.

446. Arithmetic Slices II - Subsequence

Hard

447. Number of Boomerangs

Med.

448. Find All Numbers Disappeared in an Array

Easy

449. Serialize and Deserialize BST

Med.

450. Delete Node in a BST

Med.

451. Sort Characters By Frequency

Med.

452. Minimum Number of Arrows to Burst Balloons

Med.

453. Minimum Moves to Equal Array Elements

Med.

454. 4Sum II

Med.

455. Assign Cookies

Easy

456. 132 Pattern

Med.

457. Circular Array Loop

Med.

458. Poor Pigs

Hard

459. Repeated Substring Pattern

Easy

460. LFU Cache

Hard

461. Hamming Distance

Easy

462. Minimum Moves to Equal Array Elements II

Med.

463. Island Perimeter

Easy

464. Can I Win

Med.

465. Optimal Account Balancing

Hard

466. Count The Repetitions

Hard

467. Unique Substrings in Wraparound String

Med.

468. Validate IP Address

Med.

469. Convex Polygon

Med.

470. Implement Rand10() Using Rand7()

Med.

471. Encode String with Shortest Length

Hard

472. Concatenated Words

Hard

473. Matchsticks to Square

Med.

474. Ones and Zeroes

Med.

475. Heaters

Med.

476. Number Complement

Easy

477. Total Hamming Distance

Med.

478. Generate Random Point in a Circle

Med.

479. Largest Palindrome Product

Hard

480. Sliding Window Median

Hard

481. Magical String

Med.

482. License Key Formatting

Easy

483. Smallest Good Base

Hard

484. Find Permutation

Med.

485. Max Consecutive Ones

Easy

486. Predict the Winner

Med.

487. Max Consecutive Ones II

Med.

488. Zuma Game

Hard

489. Robot Room Cleaner

Hard

490. The Maze

Med.

491. Non-decreasing Subsequences

Med.

492. Construct the Rectangle

Easy

493. Reverse Pairs

Hard

494. Target Sum

Med.

495. Teemo Attacking

Easy

496. Next Greater Element I

Easy

497. Random Point in Non-overlapping Rectangles

Med.

498. Diagonal Traverse

Med.

499. The Maze III

Hard

500. Keyboard Row

Easy

501. Find Mode in Binary Search Tree

Easy

502. IPO

Hard

503. Next Greater Element II

Med.

504. Base 7

Easy

505. The Maze II

Med.

506. Relative Ranks

Easy

507. Perfect Number

Easy

508. Most Frequent Subtree Sum

Med.

509. Fibonacci Number

Easy

510. Inorder Successor in BST II

Med.

511. Game Play Analysis I

Easy

512. Game Play Analysis II

Easy

513. Find Bottom Left Tree Value

Med.

514. Freedom Trail

Hard

515. Find Largest Value in Each Tree Row

Med.

516. Longest Palindromic Subsequence

Med.

517. Super Washing Machines

Hard

518. Coin Change II

Med.

519. Random Flip Matrix

Med.

520. Detect Capital

Easy

521. Longest Uncommon Subsequence I

Easy

522. Longest Uncommon Subsequence II

Med.

523. Continuous Subarray Sum

Med.

524. Longest Word in Dictionary through Deleting

Med.

525. Contiguous Array

Med.

526. Beautiful Arrangement

Med.

527. Word Abbreviation

Hard

528. Random Pick with Weight

Med.

529. Minesweeper

Med.

530. Minimum Absolute Difference in BST

Easy

531. Lonely Pixel I

Med.

532. K-diff Pairs in an Array

Med.

533. Lonely Pixel II

Med.

534. Game Play Analysis III

Med.

535. Encode and Decode TinyURL

Med.

536. Construct Binary Tree from String

Med.

537. Complex Number Multiplication

Med.

538. Convert BST to Greater Tree

Med.

539. Minimum Time Difference

Med.

540. Single Element in a Sorted Array

Med.

541. Reverse String II

Easy

542. 01 Matrix

Med.

543. Diameter of Binary Tree

Easy

544. Output Contest Matches

Med.

545. Boundary of Binary Tree

Med.

546. Remove Boxes

Hard

547. Number of Provinces

Med.

548. Split Array with Equal Sum

Hard

549. Binary Tree Longest Consecutive Sequence II

Med.

550. Game Play Analysis IV

Med.

551. Student Attendance Record I

Easy

552. Student Attendance Record II

Hard

553. Optimal Division

Med.

554. Brick Wall

Med.

Remove distracting text, extract the programming question, provide simple, common, and optimized Java solution for it.