Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse
Sulge

"recursively" - 2 õppematerjali

PPK outdated
24
doc

PPK(outdated)

Count the number of certain word in a string if(str.length() < 2) return 0; if(str.startsWith("hi")) return 1 + countHi(str.substring(1)); return countHi(str.substring(1)) ; } 2. Replace pi with 3.14 (hhhpihhh -> hhh3.14hhh) if(str.length()<2) return str; if(str.startsWith("pi")) return "3.14" + changePi(str.substring(2)); return str.charAt(0) + changePi(str.substring(1)); 4. Given a string, compute recursively a new string where all the adjacent chars are now separated by a "*". if(str.length()==1 || str.equals("")) return str; return str.charAt(0) + "*" + allStar(str.substring(1)); 5. Given a string, compute recursively a new string where identical chars that are adjacent in the original string are separated from each other by a "*". if (str.length()<2) return str; if(str.charAt(0)==str.charAt(1)) return str.charAt(0) + "*" + pairStar(str.substring(1)); return str

Informaatika → Java programmeerimine
35 allalaadimist
Boolean Functions and their Cryptographic Criteria
13
pdf

Boolean Functions and their Cryptographic Criteria

Based on Lemma 3.1 the equation stands. ∎ 3.1 Hadamard matrices Definition 3.4. A Hadamard matrix 𝐻 of order 𝑛 is an 𝑛 × 𝑛 matrix with elements from {−1, 1}, such that 𝐻𝐻 𝑡 = 𝑛𝐼𝑛 , where 𝐻 𝑡 is the transpose of 𝐻 and 𝐼𝑛 is the 𝑛 × 𝑛 identity matrix. The product of any two distinct rows or columns of 𝐻 is zero. Hadamard matrix is often defined recursively by: 𝐻𝑛−1 𝐻𝑛−1 𝐻𝑛 = ( ) , 𝐻𝑜 = (1) 𝐻𝑛−1 −𝐻𝑛−1 For example: 1 1 1 1 1 1 𝐻1 = ( ), 𝐻2 = ( 1 −1 1 −1) etc.

Informaatika → krüptograafia
1 allalaadimist


Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun