Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
0 answers
853 views

Kadane's algorithms to leetcode "121 Best Time to Buy and Sell Stock"

I employed the conventional Kadane's algorithms to solve a maximum subarray problem in leetcode Best Time to Buy and Sell Stock - LeetCode Description Best Time to Buy and Sell Stock ...
Alice's user avatar
  • 605
4 votes
0 answers
497 views

Two solutions to leetcode 127.wordLadder

I am working on Word Ladder - LeetCode Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, such ...
Alice's user avatar
  • 605
4 votes
3 answers
153 views

Associating a string with a derived class

I am using the following code to get a string that is associated with the class of an instance: ...
oddRaven's user avatar
  • 157
3 votes
4 answers
565 views

Finding anagrams in Java (space-optimised)

I've lately been asked in a job interview to program a solution for the well known anagrams problem: given two strings s1 and s2,...
u6f6o's user avatar
  • 291
5 votes
1 answer
518 views

CodeEval solutions to find trailing strings

This is a problem in CodeEval, moderate level. The problem is very easy for this level. But I am not able to get more than 60 points for any solution I submit. (Moderate levels highest score is 65 and ...
user281693's user avatar