subject

Given a pattern as the first argument and a string of blobs split by | show the number of times the pattern is present in each blob and the total number of matches. input: the input consists of the pattern ("bc" in the example) which is separated by a semicolon followed by a list of blobs ("bcdefbcbebc|abcdebcfgsdf|cbdbesfb cy|1bcdef23423bc32" in the example). example input: bc; bcdefbcbebc|abcdebcfgsdf|cbdbesfbcy |1bcdef23423bc32output: the output should consist of the number of occurrences of the pattern per blob (separated by |). additionally, the final entry should be the summation of all the occurrences (also separated by |). example output: 3|2|1|2|8 where bc was repeated 3 times, 2 times, 1 time, 2 times in the 4 blobs passed in. and 8 is the summation of all the occurrences. (3+2+1+2 = 8)test 1: input: aa; kjlhaa|aaadsaaa|easaaad|saoutput: 4|4|2|0|10code to be used: import java. io. bufferedreader; import java. io. ioexception; import java. io. inputstreamreader; import java. nio. charset. standardcharsets; public class main {/** * iterate through each line of input. */public static void main(string[] args) throws ioexception {inputstreamreader reader = new inputstreamreader(system. in, standardcharsets. utf_8); bufferedreader in = new bufferedreader(reader); string line; while ((line = in. = null) {string[] splittedinput = line. split("; "); string pattern = splittedinput[0]; string blobs = splittedinput[1]; main. dosomething(pattern, blobs); }} public static void dosomething(string pattern, string blobs) {// write your code here. feel free to create more methods and/or classes}}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:00
Which of the following kinds of programs displays an online advertisement in a banner or pop-up window on webpages, email, or other internet service? e
Answers: 2
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e.g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
Write a program in plp assembly that counts up by one starting from zero (or one) inside a loop and writes this value to the leds every time the value is increased. the memory address of the leds is 0xf0200000. the table below shows the meaning and an example usage of the instructions covered in the video, plp instructions for project 1. instruction example usage meaning load immediate li $t0, 8 register $t0 is set to the value, 8. store word sw $t2, 0($t1) the value in register $t1 is used as the memory address. the value in register $t2 is copied into this memory address. add addiu $t4, $t3, 29 register $t4 is assigned the sum of 29 and the value in register $t3. jump j your_label_name the program jumps to the line following the label, "your_label_name: ". label your label name: defines a label called "your_label_name: " that can be jumped to
Answers: 2
You know the right answer?
Given a pattern as the first argument and a string of blobs split by | show the number of times the...
Questions
question
Mathematics, 25.05.2021 01:00
question
Mathematics, 25.05.2021 01:00
question
History, 25.05.2021 01:00
Questions on the website: 13722363