Skip to content

Instantly share code, notes, and snippets.

View aadipoddar's full-sized avatar
🏠
Working from home

Aadi Poddar aadipoddar

🏠
Working from home
View GitHub Profile
@aadipoddar
aadipoddar / MobiusNumber.java
Created February 1, 2022 06:51
Program To Find Mobius Function
/*
A MOBIUS function M(N) returns the value -1 or 0 or 1 fora natural number (N) by
the following conditions are defined :
When,
M(N) =1 if N=1.
M(N) =0 if any prime factor of N is contained more than once.
M(N) =(-1)^P if N is the product of ‘P’ distinct prime factors.
<UserSettings><ApplicationIdentity version="17.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"><ToolsOptionsSubCategory name="Import and Export Settings" RegisteredName="Import and Export Settings" PackageName="Visual Studio Environment Package"><PropertyValue name="TrackTeamSettings">false</PropertyValue><PropertyValue name="TeamSettingsFile">0</PropertyValue><PropertyValue name="AutoSaveFile">%vsspv_vs_localappdata_dir%\settings\CurrentSettings.vssettings</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name="ProductUpdates" RegisteredName="ProductUpdates" PackageName="VS Setup Composition"><PropertyValue name="OperationMode">InstallWhileDownloading</PropertyValue><PropertyValue name="IsBackgroundDownloadEnabled">true</PropertyValue></ToolsOptionsSubCategory><ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"><PropertyValue name="ShowMiscFilesProject">false</PropertyValue><PropertyValue
@aadipoddar
aadipoddar / ParagraphFrequency.java
Created January 10, 2022 08:17
Input Paragraph and Find the common words and their frequencies.
/*
WAP to input a paragraph containing two sentences only.
The sentences terminate with either with !? .
Any other characters maybe ignored.
The words are to be separated by single blank space and in upper case.
Check for the validity of the paragraph and sentences.
Separate the sentences and print them separately.
Find the common words and their frequencies.
*/
@aadipoddar
aadipoddar / Caesar_Cipher_Encryption.java
Created December 18, 2021 17:01
Encrypt Sentence with Caesar Cipher method
/*
*Enter a Sentence and Encrypt it with Caesar Cipher method (13 characters shift)
*Hello! How are you?
*Uryyb! Ubj ner lbh?
*/
import java.util.Scanner;
@aadipoddar
aadipoddar / ChernoVS.vssettings
Created December 18, 2021 06:47
Visual Studio Settings
<UserSettings><ApplicationIdentity version="14.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"><ToolsOptionsSubCategory name="Documents" RegisteredName="Documents" PackageName="Visual Studio Environment Package"><PropertyValue name="ShowMiscFilesProject">false</PropertyValue><PropertyValue name="AutoloadExternalChanges">true</PropertyValue><PropertyValue name="CheckForConsistentLineEndings">false</PropertyValue><PropertyValue name="SaveDocsAsUnicodeWhenDataLoss">false</PropertyValue><PropertyValue name="InitializeOpenFileFromCurrentDocument">true</PropertyValue><PropertyValue name="ReuseSavedActiveDocWindow">false</PropertyValue><PropertyValue name="DetectFileChangesOutsideIDE">true</PropertyValue><PropertyValue name="DontShowGlobalUndoChangeLossDialog">true</PropertyValue><PropertyValue name="AllowEditingReadOnlyFiles">true</PropertyValue><PropertyValue name="DocumentDockPreference">0</PropertyValue><PropertyValue name="MiscFilesProjectSavesLastNItems">0</PropertyValue
/*
* Input a Sentence and Print it in Ascending Order
*
* AS YOU SOW SO SHALL YOU REAP.
* AS SO SOW YOU YOU REAP SHALL.
*/
import java.util.Scanner;
class Sentence_Ascending
@aadipoddar
aadipoddar / Sent_Modi.java
Created December 16, 2021 18:42
School Program Palindrome Sentence Convert
/*
Write a program to accept a sentence which may be terminated by either '.', '?' or '!'
only. The words are to be entered by s asingle blank space and re in UPPER CASE.
Perform the following tasks:
(a) Check for validity for the entered senctence.
(b) Convert the non-palidrome words of the sentence into palidrome words by
concatenating the word by its revers (excluding the last character).
Example: The reverse of the word HELP would be LEH (ommiting the