An efficient solution to HackerRank Repeated String Problem using Python 3.x. The time complexity of the program is O(n). This can also be implemented in Java and C++ as the solution is not Pythonic.
Information and data security pseudorandom number generation and stream cipherMazin Alwaaly
Information And Data Security Pseudorandom Number Generation and Stream Cipher seminar
Mustansiriya University
Department of Education
Computer Science
Salsa 20 cipher is one of the prominent ciphers which can replace the famous Advance Encryption Standard (AES).It was already selected by eSTREAM.It reached in round 3 under the software portfolio.
Information and data security pseudorandom number generation and stream cipherMazin Alwaaly
Information And Data Security Pseudorandom Number Generation and Stream Cipher seminar
Mustansiriya University
Department of Education
Computer Science
Salsa 20 cipher is one of the prominent ciphers which can replace the famous Advance Encryption Standard (AES).It was already selected by eSTREAM.It reached in round 3 under the software portfolio.
One of the main reasons for the popularity of Dijkstra's Algorithm is that it is one of the most important and useful algorithms available for generating (exact) optimal solutions to a large class of shortest path problems. The point being that this class of problems is extremely important theoretically, practically, as well as educationally.
The fundamentals and implementation of digital electronics are essential to understanding the design and working of consumer/industrial electronics, communications, computers, security and military equipment. Digital electronics includes many applications in real life. Here are three different and most important application of Digital Electronics.
This presentation contains the contents pertaining to the undergraduate course on Cryptography and Network Security (UITC203) at Sri Ramakrishna Institute of Technology. This covers the Elliptic Curve Cryptography and the basis of elliptic curve arithmetics.
Modern Block Cipher- Modern Symmetric-Key CipherMahbubur Rahman
Introduction to Modern Symmetric-Key Ciphers- This lecture will cover only "Modern Block Cipher".
Slide Credit: Maleka Khatun & Mahbubur Rahman
Dept. of CSE, JnU, BD.
CMACs and MACS based on block ciphers, Digital signatureAdarsh Patel
cmcs
MACs based on Block Ciphers
Digital Signature
Properties , Requirements and Security of Digital Signature
Various digital signature schemes ( Elgamal and Schnorr )
One of the main reasons for the popularity of Dijkstra's Algorithm is that it is one of the most important and useful algorithms available for generating (exact) optimal solutions to a large class of shortest path problems. The point being that this class of problems is extremely important theoretically, practically, as well as educationally.
The fundamentals and implementation of digital electronics are essential to understanding the design and working of consumer/industrial electronics, communications, computers, security and military equipment. Digital electronics includes many applications in real life. Here are three different and most important application of Digital Electronics.
This presentation contains the contents pertaining to the undergraduate course on Cryptography and Network Security (UITC203) at Sri Ramakrishna Institute of Technology. This covers the Elliptic Curve Cryptography and the basis of elliptic curve arithmetics.
Modern Block Cipher- Modern Symmetric-Key CipherMahbubur Rahman
Introduction to Modern Symmetric-Key Ciphers- This lecture will cover only "Modern Block Cipher".
Slide Credit: Maleka Khatun & Mahbubur Rahman
Dept. of CSE, JnU, BD.
CMACs and MACS based on block ciphers, Digital signatureAdarsh Patel
cmcs
MACs based on Block Ciphers
Digital Signature
Properties , Requirements and Security of Digital Signature
Various digital signature schemes ( Elgamal and Schnorr )
• List is a collection, which is ordered and changeable. Allows duplicate members.
• Tuple is a collection, which is ordered and unchangeable. Allows duplicate members.
• Set is a collection, which is unordered and unindexed. No duplicate members.
• Dictionary is a collection, which is unordered, changeable and indexed. No duplicate members.
: String, List, Tuple, Dictionary
• List is a collection, which is ordered and changeable. Allows duplicate members.
• Tuple is a collection, which is ordered and unchangeable. Allows duplicate members.
• Set is a collection, which is unordered and unindexed. No duplicate members.
• Dictionary is a collection, which is unordered, changeable and indexed. No duplicate members.
For this assignment, download the A6 code pack. This zip fil.docxalfred4lewis58146
For this assignment, download the
A6 code pack
. This zip file contains several files:
main.cpp
- the predetermined main.cpp. This file shows the usage and functionality that is expected of your program. You are not allowed to edit this file. You will not be submitting this file with your assignment.
CMakeLists.txt
- the preset CMake file to build with your functions files.
input/greeneggsandham.txt
- the contents of Green Eggs and Ham in text format.
input/aliceChapter1.txt
- the first chapter of Alice in Wonderland in text format.
output/greeneggsandham.out
- the expected output when running your program against the
greeneggsandham.txt
file
output/aliceChapter1.out
- the expected output when running your program against the
aliceChapter1.txt
file
Your task is to provide the implementations for all of the referenced functions. You will need to create two files:
functions.h
and
functions.cpp
to make the program work as intended.
You will want to make your program as general as possible by not having any assumptions about the data hardcoded in. Two public input files have been supplied with the starter pack. We will run your program against a third private input file.
Function Requirements
The requirements of each function are given below. The input, output, and task of each function is described. The functions are:
promptUserForFilename()
openFile()
readWordsFromFile()
removePunctuation()
capitalizeWords()
filterUniqueWords()
alphabetizeWords()
countUniqueWords()
printWordsAndCounts()
countLetters()
printLetterCounts()
printMaxMinWord()
printMaxMinLetter()
promptUserForFilename()
Input
: None
Output
: A string
Task
: Prompt the user to enter a filename.
openFile()
Input
: (1) The input file stream (2) The string filename to open
Output
: True if the file successfully opened, False if the file could not be opened
Task
: Open the input file stream for the corresponding filename. Check that the file opened correctly. The string filename will remain unchanged.
readWordsFromFile()
Input
: The input file stream
Output
: A vector of strings
Task
: Read all of the words that are in the filestream and return a list of all the words in the order present in the file.
removePunctuation()
Input
: (1) A vector of strings (2) A string of all the punctuation characters to remove
Output
: None
Task
: For each word in the vector, remove all occurrences of all the punctuation characters denoted by the punctuation string. When complete, the input vector will now hold all the words with punctuation removed. The punctuation string will remain unchanged.
capitalizeWords()
Input
: A vector of strings
Output
: None
Task
: For each word in the vector, convert each character to its upper case equivalent. When complete, the input vector will now hold all the words capitalized.
filterUniqueWords()
Input
: A vector of strings
Output
: A vector of strings
Task
: The function will return only th.
The first lecture of the ACM Aleppo CPC training. The local contest of ICPC. This lecture will help you get started in programming contests word with the lower bound techniques. The lectures focus on the C++ programming language and the STL library to solve programming problems.
Text Preprocessing is the first step before converting text data into vectors for NLP-based models. This step can also get complicated as text data is not always friendly.
This documentation includes the majority of the steps carried out for preprocessing for making the lives of the Data Scientists and NLP practitioners much easier.
Fundamentals of Cryptography - Caesar Cipher - Python Isham Rashik
Documentation of the cipher program that allows the letters in a raw text file to be ciphered - encrypted or decrypted. The program is implemented in Python 3.x. Code implementation followed by demonstration on how the program is to be used are outlined within this document.
Corporate Finance - Disney Sea Park ProjectIsham Rashik
Case study on the subject: Corporate Finance. Based on industrial, economic and financial (in-depth) analysis, the project - DisneySea Park were decided whether it should be continued or not.
Human Resource Management - Different Interview TechniquesIsham Rashik
Different types of interview techniques that are commonly used by the interviewers, errors that are caused by the interviewers and how to make the interview successful are discussed.
Most commonly used commands and functions that are used for reading and writing text files in Python 3.x. Therefore, these commands are used for manipulating file objects.
Android Application Development - Level 3Isham Rashik
Final level of the Android Application Development series. With this tutorial documentation, this will enable mobile developers to gain complete basic knowledge of Android Development. After completing all 3 of the levels, the developers can proceed with intermediary and advanced concepts.
Android Application Development - Level 2Isham Rashik
Continuation of Android Application Development - Level 1. Further fundamentals required to become an Android Developer is explained. It is aimed at people with basic knowledge of programming or must have read Level 1 documentation.
Android Application Development - Level 1Isham Rashik
Very basics of Android Application Development for the beginners who have no prior experience with programming. Can be used for hobby purpose as well as educational material for the academic purpose.
Operations Management - Business Process Reengineering - ExampleIsham Rashik
Mini assignment on Business Process Reengineering. All the steps before reengineering, to improvise the operation process and after reengineering were explained. Flowchart for the operation process before and after reengineering were created.
Lighting Design - Theory and CalculationsIsham Rashik
Types of lamps, how lamps/luminaires can be mounted and its varieties, basic terminologies associated with illumination engineering, essentials and how lightings are designed for rooms and its classroom example for getting a clear picture of lighting design concept.
Linear Control Hard-Disk Read/Write Controller AssignmentIsham Rashik
Classic Hard-Disk Read/Write Head Controller Assignment completed using MATLAB and SIMULINK. To see the diagrams in detail, please download first and zoom it.
Circuit Breakers for Low Voltage ApplicationsIsham Rashik
Features, Working principles, and differences of Miniature Circuit Breaker(MCB), Moulded Case Circuit Breaker(MCCB) and Residual Current Circuit Breaker (RCCB) are explained in basic terms.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
1. Repeated String
Lilah has a string, , of lowercase English letters that she repeated infinitely many times.
Given an integer, , find and print the number of letter a 's in the first letters of Lilah's infinite string.
Input Format
The first line contains a single string, .
The second line contains an integer, .
Constraints
For of the test cases, .
Output Format
Print a single integer denoting the number of letter a 's in the first letters of the infinite string created by
repeating infinitely many times.
Sample Input 0
aba
10
Sample Output 0
7
Explanation 0
The first letters of the infinite string are abaabaabaa . Because there are a 's, we print on a
new line.
Sample Input 1
a
1000000000000
Sample Output 1
1000000000000
Explanation 1
Because all of the first letters of the infinite string are a , we print
on a new line.
2. def repeatedString(s, n):
'''Computes and returns total number of occurrences of the character 'a'
in the prefix of length n of an infinitely repeating string.
Parameters:
s - Input string which is considered to be repeated infinitely.
n - The first number of letters to be considered for counting number
of occurrences of the character 'a' in the infinite string.
Returns:
Total number of occurrences of the character 'a'.
'''
# Length of string.
len_str = len(s)
# Number of repeated strings to be considered.
num_strs = n//len_str
# Remainder: Let's consider an example - s = 'abc' and n = 11.
# Therefore, the string to be considered for finding the number
# of occurrences of 'a' will be: 'abcabcabcab'. The string is
# repeating 3 times(abcabcabc). Now, remaining letters are only 2(ab).
# Therefore, length of remaining letters is calculated as below syntax.
remainder = n%len_str
# Counter to count number of a's from given string.
count1 = 0
# Counter to count a's from the remaining set of letters. In the end, it
# will be used to calculate total number of a's in the string.
count2 = 0
for i in range(len_str):
# Calculating number of occurrences of character 'a' from the given string
if s[i] == 'a':
count1 += 1
# Calculating number of occurrences from remaining letters
# if they exist.
if s[i] == 'a' and i < remainder:
count2 += 1
# Calculating total number of a's in the string
total = count1*num_strs + count2
return total
# Testing
print(repeatedString('aba', 10))