Quantcast
Browsing all 39796 articles
Browse latest View live

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 Article


How 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 Article


CHEFFED - 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 Article

CHEFIHG - Editorial

PROBLEM LINK:PracticeContestAuthor:Misha ChorniyTester:Karan AggarwalEditorialist:Pushkar MishraDIFFICULTY:Easy-MediumPREREQUISITES:Breadth First Search, GraphsPROBLEM:Given is a matrix of dimensions...

View Article

STICKS - Editorial

PROBLEM LINK:PracticeContestAuthor:Hasan JaddouhTester:Misha ChorniyEditorialist:Pushkar MishraDIFFICULTY:SimplePREREQUISITES:GreedyPROBLEM:Given an array of $A$ of $N$ integers which represent stick...

View Article


Directi 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 Article

WORKCHEF - 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 Article

Image may be NSFW.
Clik here to view.

QSET - Editorial

PROBLEM LINK:PracticeContestAuthor:Lalit KunduTester:Shiplu HawladerEditorialist:Lalit KunduDIFFICULTY:MEDIUMPRE-REQUISITES:Segment Trees, Number TheoryPROBLEM:Given a string of digits of length...

View Article


BBSYSTEM - 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 Article


ICLFIN03 - 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 Article

Submission 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 Article

Why do I get a Runtime exception?

Why am i getting runtime exception?

View Article

Division 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 Article


FCTRL - 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 Article

StopStalk: 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 Article


STUDVOTE - 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 Article

LUMPYBUS - 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 Article


How 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 Article

CLOSEFAR - Editorial

PROBLEM LINK:PracticeContestAuthor:Animesh FatehpuriaTester:Pushkar MishraEditorialist:Animesh FatehpuriaDIFFICULTY:MediumPREREQUISITES:Mo's Algorithm, Segment Trees, Lowest Common AncestorPROBLEM:You...

View Article

what 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
Browsing all 39796 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>