On Friday, October 17, 2014 12:51:01 PM UTC+2, Ashish Negi wrote: > > Ok so i am back with this and rechanged the code and used another > algorithm : created by great Dijkstra Shunting Yard algo which creates the > infix to postfix conversion. > > My implementation here : > https://gist.github.com/ashishnegi/ef3c65182c09c154126b > > Now, i have only one test case unsolved which is giving timeout.. and i > think it would be largest test case. > so, if you can find some performance bottleneck in the code like anything > using or not using doall or something.. it would be great to know. >
Kuddos for the infix to postfix conversion, this is akin to what I had in mind to remove the recursion (sorry I did not have time to check my code and I did not want to send you off-tracks). Have you inquired about http://clojuredocs.org/clojure.core/*unchecked-math* ? You accumulate in lists '() to create your stack, have you tried with vectors ? (the conj add in last position, so you'd want to peek and pop http://clojuredocs.org/clojure.core/pop ) Not sure if it would be faster, however. Best Regards, Bernard PS: some of your functions are in CamelCase, is there a reason why ? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.