This file contains hidden or 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
#๐ - ๐๐ฐ๐จ ๐๐ญ๐ซ๐ข๐ง๐ ๐ฌ | |
๐๐๐ฌ๐๐ซ๐ข๐ฉ๐ญ๐ข๐จ๐ง: | |
Given two strings, determine if they share a common substring of at least one character. | |
๐๐จ๐ฅ๐ฎ๐ญ๐ข๐จ๐ง ๐๐ฏ๐๐ซ๐ฏ๐ข๐๐ฐ: | |
I used a dictionary to solve this problem. The approach involves storing characters from the first string in a dictionary and then checking if any character from the second string is present in this dictionary. | |
๐๐จ๐๐: | |
๐๐๐ ๐ก๐ค๐๐๐ก๐๐๐๐๐ (๐ 1, ๐ 2): |
This file contains hidden or 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 javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
import javax.crypto.SecretKey; | |
import javax.xml.bind.DatatypeConverter; | |
public class AESEncryption { | |
public static void main(String[] args) throws Exception { | |
String plainText = "Hello World"; | |
SecretKey secKey = getSecretEncryptionKey(); | |
byte[] cipherText = encryptText(plainText, secKey); | |
String decryptedText = decryptText(cipherText, secKey); |
This file contains hidden or 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
#include<stdio.h> | |
#include<math.h> | |
int gcd(int a, int h) | |
{ | |
int temp; | |
while (1) | |
{ | |
temp = a%h; | |
if (temp == 0) | |
return h; |