Skip to content

Latest commit

 

History

History
135 lines (114 loc) · 2.72 KB

_2396. Strictly Palindromic Number.md

File metadata and controls

135 lines (114 loc) · 2.72 KB

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Back to top


First completed : June 09, 2024

Last updated : July 04, 2024


Related Topics : Math, Two Pointers, Brainteaser

Acceptance Rate : 88.05 %


Intuition: None will be cause for any value $n$, $n$ in the base $n-2$ will be something $100000...000$ as the $(n-2)$ value, plus $00000..0002$ for the other end cause of the offset.


Solutions

Python

class Solution:
    def isStrictlyPalindromic(self, n: int) -> bool:
        return False
class Solution(object):
    def isStrictlyPalindromic(self, n):
        """
        :type n: int
        :rtype: bool
        """
        return False

C

#define isStrictlyPalindromic(n) false
bool isStrictlyPalindromic(int n) {
    return false;
}

C++

class Solution {
public:
    bool isStrictlyPalindromic(int n) {
        return false;
    }
};

Java

class Solution {
    public boolean isStrictlyPalindromic(int n) {
        return false;
    }
}

JavaScript

/**
 * @param {number} n
 * @return {boolean}
 */
var isStrictlyPalindromic = function(n) {
    return false;
};

Kotlin

class Solution {
    fun isStrictlyPalindromic(n: Int): Boolean {
        return false;
    }
}

Ruby

# @param {Integer} n
# @return {Boolean}
def is_strictly_palindromic(n)
    return false
end

Rust

impl Solution {
    pub fn is_strictly_palindromic(n: i32) -> bool {
        return false;
    }
}