Back to Browse

Subarray Division 1 Problem in Java | Hacker Rank Interview Preparation | 1 Month Preparation Kit.

367 views
Premiered Sep 3, 2022
53:10

This video is about Step by step explanation of Subarray Division 1 problem on Hacker Rank. This question is basically from Hacker Rank 1 Month Interview Preparation Week 1 - Question 11 --------------------------------------------------------------------------------------------------------------------- Two children, Lily and Ron, want to share a chocolate bar. Each of the squares has an integer on it. Lily decides to share a contiguous segment of the bar selected such that: • The length of the segment matches Ron's birth month, and, • The sum of the integers on the squares is equal to his birth day. Determine how many ways she can divide the chocolate. Example 8 = [2, 2, 1, 3, 2] d = 4 m = 2 Lily wants to find segments summing to Ron's birth day, d = 4 with a length equalling his birth month, m = 2. In this case, there are two segments meeting her criteria: [2, 2] and [1, 3]. Function Description Complete the birthday function in the editor below. birthday has the following parameter(s): ⚫ int s[n]: the numbers on each of the squares of chocolate ⚫int d: Ron's birth day ⚫int m: Ron's birth month Returns ⚫int: the number of ways the bar can be divided #subarraydivision1 #hackerrank #solution #subarray #division #divison1 --------------------------------------------------------------------------------------------------------------------- Just visit the below website for code:- http://bit.do/nobi Don't' Forget to Like, Share and Subscribe for future updates... Thank you!!!!!!!! After copying and pasting the code, still not working Don't Worry I'm hereby to help you Ping me on Instagram. 💎FOLLOW US ON INSTAGRAM: https://www.instagram.com/shivasai_alle/ Email:- [email protected]

Download

0 formats

No download links available.

Subarray Division 1 Problem in Java | Hacker Rank Interview Preparation | 1 Month Preparation Kit. | NatokHD