Hey 👋, Welcome to VK's

Leetcode Solutions 🪨

Back to all solutions

Palindrome

Created on: 30/10/2022

Given an integer x, return true if x is a palindrome, and false otherwise.

Language Used: python

const fs = require('fs')
const markdown = require('markdown-it')
const shiki = require('shiki')

shiki.getHighlighter({
  theme: 'nord'
}).then(highlighter => {
  const md = markdown({
    html: true,
    highlight: (code, lang) => {
      return highlighter.codeToHtml(code, { lang })
    }
  })

  const html = md.render(fs.readFileSync('index.md', 'utf-8'))
  const out = `
    <title>Shiki</title>
    <link rel="stylesheet" href="style.css">
    ${html}
    <script src="index.js"></script>
  `
  fs.writeFileSync('index.html', out)

  console.log('done')
})

Leetcode Link:

🪨 VK Leetcode Solutions

© Copyright 2022 JS Vignesh Kanna

Follow me on: