This kernel requires an x86-64 CPU….issue – Solution!

I have tried numerous times to install Ubuntu and Windows Server, both 64 bit OS in my Oracle VM VirtualBox however I always had, “This 64-bit application couldn’t load because your PC doesn’t have a 64-bit processor” or “this kernel requires an x86-64 CPU, but only detects an i686 CPU, unable to boot” errors though … [Read more…]

Java Strings Part Two- 16 Problems with Solutions

Problem-1 Given a string, return a string where for every char in the original, there are two chars. Example doubleChar(“The”) → “TThhee” doubleChar(“AAbb”) → “AAAAbbbb” doubleChar(“Hi-There”) → “HHii–TThheerree” Solution public String doubleChar(String str) { String result=””; for (int i=0;i<str.length();i++){ result+=str.substring(i,i+1)+str.substring(i,i+1); } return result; } Problem-2 Return the number of times that the string “hi” appears … [Read more…]

Java Logic Part Two- 9 Problems with Solutions

Problem-1 We want to make a row of bricks that is goal inches long. We have a number of small bricks (1 inch each) and big bricks (5 inches each). Return true if it is possible to make the goal by choosing from the given bricks. Example makeBricks(3, 1, 8) → true makeBricks(3, 1, 9) … [Read more…]

Java Logic Part One -30 Problems with Solutions

Problem-1 When squirrels get together for a party, they like to have cigars. A squirrel party is successful when the number of cigars is between 40 and 60, inclusive. Unless it is the weekend, in which case there is no upper bound on the number of cigars. Return true if the party with the given … [Read more…]