HINTS AND SOLUTION TO SPOJ QUESTIONS

Explanations to some of the questions solved by me.First try to solve with the help of the hint. Read the solution only if you give up.

Sunday, 11 June 2017

KQUERYO

›
K-Query Online Link to the question :  KQUERYO HINT : Question can be easily solved with Segment Trees with vector.  Read more a...
Wednesday, 7 June 2017

QUEEN

›
Wandering Queen Link to the question :  QUEEN HINT : This question requires bfs as can be clearly understood from the tag. We st...
13 comments:
Friday, 4 March 2016

PROFF

›
Professor Farouk Question Link to the question :  PROFF HINT : Just simple brute force.  Add one digit at a time from righ...
Wednesday, 2 March 2016

ABA12C

›
Buying Apples! Link to the question :  ABA12C HINT : This is a problem of unbounded knapsack.  We will maintain an array ans[ k+...
10 comments:
Tuesday, 1 March 2016

KQUERY

›
K-query Link to the question :  KQUERY HINT : PREREQUISITE : BINARY INDEXED TREE This is an offline approach.  Store the arra...
Tuesday, 26 January 2016

PPATH

›
Prime Path Link to the question :  PPATH RECOMMENDED QUESTION: Try your hands on this permutation question :  QUESTION HINT :...
Saturday, 10 October 2015

MORENA

›
Morenas Candy Shop ( Easy ) Link to the question :  MORENA HINT : Think of dp solution. We check if a[i] is > or <...
1 comment:
Monday, 5 October 2015

TWOSQRS

›
Two squares or not two squares Link to the question :  TWOSQRS HINT : Logic seems very clear. Just we need check if the num...
Wednesday, 23 September 2015

BAT3

›
BATMAN3 Link to the question :  BAT3   HINT : I would suggest you to try the longest increasing sub sequence problem first. ...
2 comments:
Friday, 11 September 2015

YELBRICK

›
The Yellow Brick Road Link to the question :  YELBRICK   HINTS : Very simple ad-hoc question. Just find the gcd of the leng...
2 comments:
›
Home
View web version

About Me

Sushant
View my complete profile
Powered by Blogger.