+ 1

X layers V pattern - Help me solve this in any language please

XLayers V Pattern - StringThe program must accept a string S and an integer X as the input. The program must print the X Layers V Pattern based on the following conditions. - The string S must be printed diagonally from the top-left to the bottom-middle X times(one below the other). - Similarly, the string S must be printed diagonally from the top-right to the bottom-middle X times(one below the other). - The empty spaces must be printed as asterisks. Boundary Condition(s):3 <= Length of S <= 1001 <= X <= Length of SInput Format: The first line contains S.The second line contains X.Output Format:The lines contain the X Layers V Pattern as shown in the Example Input/Output section. Example Input/Output 1: Input: packing 3 Output: p***********p pa*********ap pac*******cap *ack*****kca* **cki***ikc** ***kin*nik*** ****ingni**** *****ngn***** ******g****** Explanation:Here the given string is packing and the value of X is 3. The string packing is printed diagonally (from the top-left to t

3rd May 2021, 5:46 PM
Mohamed Ashik Badusha
Mohamed Ashik Badusha - avatar
3 Antworten
3rd May 2021, 8:41 PM
Oma Falk
Oma Falk - avatar
+ 1
Mohamed Ashik Badusha I am a little bit confused here. You asked for an example in any language of a problem you have specified. Frogged has provided an example, but now you state that it has failed some unknown test case Where is your attempt? What are you learning when you expect expect others to do your work for you
5th May 2021, 11:03 AM
Rik Wittkopp
Rik Wittkopp - avatar
0
It didn't pass, it has other failed test cases too
3rd May 2021, 8:49 PM
Mohamed Ashik Badusha
Mohamed Ashik Badusha - avatar