You are not logged in. Please login at to post your questions!


Please explain why my code is failing for last test case.

Can someone help me in finding the error in logic as my last case is not passing. Any help would be appreciated.
My logic
I have taken two set one set will contain all the ingredients found on islands is it size comes out not equal to k then we will print sad.
If it's size becomes equal to k then we will check the size of other set is n if it is n it means we have taken ingredients from every islands so the size becomes n which is equal to no of islands so we will print all.
else we will print sad.

My Solution

asked 17 Jun '18, 12:44

gaurang44's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 17 Jun '18, 12:44

question was seen: 55 times

last updated: 17 Jun '18, 12:44