Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN PYTHON: The Diamond Cipher is an ingenious cipher that is used to encrypt ectangular tables of characters of size . The encryption process can

IN PYTHON:

image text in transcribedimage text in transcribed

The Diamond Cipher is an ingenious cipher that is used to encrypt ectangular tables of characters of size . The encryption process can described as follows: - First create a diamond out of the table's rows considering them one by one from top to bottom: - each row is written diagonally and goes from bottom to top and from left to right; - the row begins at the line of the diamond, counting from bottom to top (where means integer division); - each symbol of the row is written to the left of the symbols already present at that diamond line. - Then the diagonals of the diamond that go from bottom to top and from right to left are written down, which produces a new table. 'our task is to encrypt the given with the Diamond Cipher. Example For table=[[a,b,c],[d,e,f],[g,h,i],[j,k,1],[m,n,o],[p,q,I]] the output should be solution(table)=[[d,j,P],[a,g,m],[e,k,qu],[b,h,n],[f,1,I],[c,i,o]] with the following encryption process: abcdefghijk1mnopqrroqnlipmkhfcjgebdadjpagmekqbhnflrcio Input/Output - [execution time limit] 4 seconds (py3) - [input] array.array.char table A matrix of size for some integer each element of which is a lowercase English letter. Guaranteed constraints: - [output] array.array.char The encrypted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

Question May a taxpayer roll over money from an IRA to an HSA?

Answered: 1 week ago

Question

Question What is the doughnut hole in HSA coverage?

Answered: 1 week ago