Skip to content

Instantly share code, notes, and snippets.

View reddyanjali's full-sized avatar
๐ŸŽฏ
Work Mode On

Anjali Deepak reddyanjali

๐ŸŽฏ
Work Mode On
View GitHub Profile
@reddyanjali
reddyanjali / ๐“๐ฐ๐จ๐’๐ญ๐ซ๐ข๐ง๐ ๐ฌ.txt
Created August 1, 2024 21:06
๐”๐ง๐ฅ๐จ๐œ๐ค๐ข๐ง๐  ๐๐ฒ๐ญ๐ก๐จ๐ง ๐๐ซ๐จ๐›๐ฅ๐ž๐ฆ๐ฌ: ๐€ ๐’๐จ๐ฅ๐ฎ๐ญ๐ข๐จ๐ง ๐’๐ž๐ซ๐ข๐ž๐ฌ
#๐Ÿ - ๐“๐ฐ๐จ ๐’๐ญ๐ซ๐ข๐ง๐ ๐ฌ
๐ƒ๐ž๐ฌ๐œ๐ซ๐ข๐ฉ๐ญ๐ข๐จ๐ง:
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):
@reddyanjali
reddyanjali / aes.java
Created December 28, 2020 06:29
Advanced Encryption Standard program in Java
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);
@reddyanjali
reddyanjali / rsa.c
Last active October 8, 2024 11:52
RSA algorithm using HTML, JavaScript and C
#include<stdio.h>
#include<math.h>
int gcd(int a, int h)
{
int temp;
while (1)
{
temp = a%h;
if (temp == 0)
return h;