Dynamic Programming Java1 Min Read LetuscrackonJune 10, 2024 Vendor Maximum Profit A vendor has a shop and he wants to purchase some items for a maximum of N rupees.There are K items in a wholesale store that the vendor is…
C Dynamic Programming1 Min Read LetuscrackonJune 10, 2024 Single Source Shortest Path There are N cities in a country which are numbered from 1 to N.The N cities are connected by L links. Each link contains the source city,the…
C Dynamic Programming1 Min Read LetuscrackonJune 10, 2024 Toll Gate Collection ExampleInput/Output 1:Input:200 <- total distance 50 <- distance b/w tolls5 <- number of tolls60 70 120 130 140 <- distance50 70…
C Dynamic Programming1 Min Read LetuscrackonJune 10, 2024 Social Media Leader There are N people in a Facebook group.The group follows the following three rules. 1) The group leader does not follow anyone.2) Everyone in…
Dynamic Programming Java2 Min Read LetuscrackonJune 10, 2024 Street Travel Count Mr.X has a bike and is travelling in a town which has N horizontal (West to East direction) and N vertical (North to South…
C Dynamic Programming2 Min Read LetuscrackonJune 9, 2024 String & Asterisks Zig-Zag Pattern The program must accept a string S and an integer N as the input. The program must form a character matrix of size NxN with the asterisks (*).…
C Dynamic Programming1 Min Read LetuscrackonJune 9, 2024 Matrix Zig-Zag from Top Left The program must accept an integer matrix of size R*C as the input. The program must print the elements from the top left of the…
C Dynamic Programming1 Min Read LetuscrackonJune 9, 2024 Matrix Zig-Zag from Bottom Right The program must accept an integer matrix of size R*C as the input. The program must print the elements from the bottom right of the…