Problem in using java arraylist getting ArrayStoreException?
List<Integer>list[]=new ArrayList[2]; list[0]=Arrays.asList(new Integer[]{1,2,3}); System.out.println(list[0]);CONSOLE LOGException in thread "main" java.lang.ArrayStoreException:...
View ArticleHow to solve toffee boxes problem ?
I have seen this problem recently and it was asked in directi hiring challenge.You have N toffee packets, each containing different number of toffees. The number of toffees contained in the ith packet...
View ArticleCHEFFED - Editorial
PROBLEM LINK:PracticeContestAuthor:Misha ChorniyTester:Karan AggarwalEditorialist:Pushkar MishraDIFFICULTY:EasyPREREQUISITES:NonePROBLEM:Given a number $N$, find the number of integers $X$ such that $X...
View ArticleCHEFIHG - Editorial
PROBLEM LINK:PracticeContestAuthor:Misha ChorniyTester:Karan AggarwalEditorialist:Pushkar MishraDIFFICULTY:Easy-MediumPREREQUISITES:Breadth First Search, GraphsPROBLEM:Given is a matrix of dimensions...
View ArticleSTICKS - Editorial
PROBLEM LINK:PracticeContestAuthor:Hasan JaddouhTester:Misha ChorniyEditorialist:Pushkar MishraDIFFICULTY:SimplePREREQUISITES:GreedyPROBLEM:Given an array of $A$ of $N$ integers which represent stick...
View ArticleDirecti Coding Round Question
Can anyone help in finding o(n) or o(n log n) solution for this particular problem. Thanks in advance :)Our Chef is opening a new restaurant in the city. Today being the inauguration night of his new...
View ArticleWORKCHEF - Editorial
PROBLEM LINK:PracticeContestAuthor:Dymtro BerezeinTester:Mugurel Ionut AndreicaEditorialist:Praveen DhinwaDIFFICULTY:mediumPREREQUISITES:maths, digit dpPROBLEM:A number $X$ is said to be $K$-special if...
View ArticleQSET - Editorial
PROBLEM LINK:PracticeContestAuthor:Lalit KunduTester:Shiplu HawladerEditorialist:Lalit KunduDIFFICULTY:MEDIUMPRE-REQUISITES:Segment Trees, Number TheoryPROBLEM:Given a string of digits of length...
View ArticleBBSYSTEM - editorial
PROBLEM LINKSPracticeContestDIFFICULTYMEDIUMEXPLANATIONBasic Observations: Let f(N, k) be the number of the integers no more than N which have exactly k divisors. For each k, f(N, k) balls can be put...
View ArticleICLFIN03 - Editorial
PROBLEM LINK:Contest link: ICLFIN03AuthorSourabh BansalTesterShubham GuptaEditorialistSourabh BansalDIFFICULTY:EASY-MEDIUMPREREQUISITES:Simple MathsPROBLEM:A team is to be formed of "n" players, all of...
View ArticleSubmission issues
Hey Chefs, I have some trouble submitting my code. I am getting this error "Main.java:6: class HolesInText is public, should be declared in a file named HolesInText.java public class HolesInText { ^ 1...
View ArticleDivision of problems by difficulty level
When the editorials are published there are 5 kind of divisions for difficulty level : 1. Cakewalk 2. Simple 3. Easy 4. Medium 5. Hard However , when the problems move to practice section the first...
View ArticleFCTRL - Editorial
PROBLEM LINK:PracticeAuthor:ADMINEditorialist:SUSHANT AGARWALDIFFICULTY:EASYPREREQUISITES:Basic looping,Basic Maths(Number Theory)PROBLEM:Find the Number of Trailing Zeroes at the end of...
View ArticleStopStalk: Tool to maintain your algorithmic progress
Hello Coders,Hope you are having a great time coding hard. Here I present to you a Utility tool - StopStalk which will encourage you to keep your algorithmic progress going by coding with your friends...
View ArticleSTUDVOTE - Editorial
PROBLEM LINK:PracticeContestAuthor:Praveen DhindhwaTester:Pushkar MishraEditorialist:Pushkar MishraDIFFICULTY:CakewalkPREREQUISITES:NonePROBLEM:Given is an array $A$, $A[i]$ tells us which person from...
View ArticleLUMPYBUS - Editorial
PROBLEM LINK:PracticeContestAuthor:Praveen DhindhwaTester:Pushkar MishraEditorialist:Pushkar MishraDIFFICULTY:EasyPREREQUISITES:GreedyPROBLEM:Given is an array $A$ of integers. We have two types of...
View ArticleHow to view and compare total time in the rankings?
Is there any way I can see total time taken by me and others in the Rankings? (I specifically mean the time on whose basis ties are broken)
View ArticleCLOSEFAR - Editorial
PROBLEM LINK:PracticeContestAuthor:Animesh FatehpuriaTester:Pushkar MishraEditorialist:Animesh FatehpuriaDIFFICULTY:MediumPREREQUISITES:Mo's Algorithm, Segment Trees, Lowest Common AncestorPROBLEM:You...
View Articlewhat could be the most optimum way to check balanced parenthesis?
I have one string which can only have '(' and ')' ex: ((())) or ()()() now I want to check whether this parenthesis is balanced or not.static boolean isValidSequence(char []s){ char[] temp=new...
View Article