Posts

Showing posts with the label HiringHackerRank

In-feeds

Total views

Solutions LTI Infinity Coding Challenge 2021

Image
  Problems and Code  Serena and Flowers Serena has a garden with N flower pots arranged in a row Every morning she walks through the row and plucks flowers She targets to visit the first K pots in the row Find the number of different flowers that Serena would pluck on an angle walk through the k pots Input Specification: input1: N, number of flower pots in Serena's garden  input2: K number of pots Serena visits one walk  inputs: An array containing pot index P to represent each pot by unique numbers (1<=P<=1000).  pots having the same flower will have the same pot index Output Specification: Your function should return the number of different flowers plucked by Serena Example 1: Input1 : 5