This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.LocalDate; | |
import java.time.format.DateTimeFormatter; | |
import java.util.Stack; | |
public class Palindrome { | |
public static void main(String[] args) { | |
LocalDate today = LocalDate.now(); | |
String formattedDate = today.format(DateTimeFormatter.ofPattern("ddMMyyyy")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
File name: download_apk.py | |
Author: Dawand Sulaiman | |
Download APK files from Google Play Store with Python | |
This script scraps https://apkpure.com to get the apk download link | |
Make sure you have BeautifulSoup and urllib libraries | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class KMP { | |
// used for KMP, Build pi function of prefixes | |
class func build_pi(_ str: String) -> [Int] { | |
let n = str.characters.count | |
var pi = Array(repeating: 0, count: n + 1) | |
var k:Int = -1 | |
pi[0] = -1 | |
for i in 0..<n { |