background preloader

Career

Facebook Twitter

Cloud

Spellicer. Barbara Hecker. JAXConference. Marakana TechTV. Upload Open Source Training Subscription preferences Loading... Working... NewCircle Training Node.js: A Jumpstart for Devs - 01 - Installing Node.js 41,250 views 10 months ago Part 1/10 - Hack together a simple geolocation app as Jeremy Osborne shows you how to get up and running with Node.js in this short tutorial series. Read more Uploads Play Context in JavaScript In this short tutorial series, Adam Breindel talks about context or the "this" keyword in JavaScript. Node.js: A Jumpstart for Devs NewCircle instructor, Jeremy Osborne gets you up and running with Node.js quickly as he walks you through creating a rudimentary geolocation app. Popular uploads 2013 Northeast Scala Symposium Check here for all the presentations from the 2013 NEScala Symposium. Created playlists HTML5 Dev Conf 3 Videos from the 3rd HTML5 Developers Conference JaxConf 2012 Channels We Like! Khan Academy Google Developers Stanford TED UC San Diego Related channels on YouTube Add to.

Part 1 - Java Thread Synchronization Tutorial. 5 Pirates Fight for 100 Gold Coins. Question: Five pirates discover a chest containing 100 gold coins. They decide to sit down and devise a distribution strategy. The pirates are ranked based on their experience (Pirate 1 to Pirate 5, where Pirate 5 is the most experienced). The most experienced pirate gets to propose a plan and then all the pirates vote on it. If at least half of the pirates agree on the plan, the gold is split according to the proposal. If not, the most experienced pirate is thrown off the ship and this process continues with the remaining pirates until a proposal is accepted. The first priority of the pirates is to stay alive and second to maximize the gold they get. Pirate 5 devises a plan which he knows will be accepted for sure and will maximize his gold.

Answer: To understand the answer, we need to reduce this problem to only 2 pirates. If there are 4 pirates, pirate 4 needs to get one more pirate to vote for his proposal. Smart right? Answers/Solutions to Exercises in the book "Memory as a programming concept in C and C++" Memory as a programming concept in C and C++  -- Answers/Solutions to Exercises in Chapter 3, Exercise 10. Answers/Solutions to Exercises in Chapter 3, Exercise 10 E10: Since we did not want to make an error in counting of bytes, we used the following code: char *p; ... p = malloc(strlen("hello")+1); strcpy(p,"hello"); instead of the intended char *p; ... p = malloc(6); strcpy(p,"hello"); Compare the memory requirement of both versions, which one requires less memory?

A10: Well, this is again one of those questions that cannot be really answered without knowing more about the circumstances, in this case the compiler. If it is a semi-decent compiler, both version will use exactly the same amount of memory. However, in the first version, there are two occurrences of a literal string "hello" and a bad compiler will store them separately, which will increase the memory requirements of the first version in comparison to the second version.

Back to Answers/Solutions Index Back to Answers/Solutions for Chapter 3 Index. 10 points about Java Heap Space or Java Heap Memory. 10 Points about Java heap memory When I started java programming I didn't know what is java heap or heap space in Java, I was even not aware of where does object in Java gets created, it’s when I started doing professional programming I came across error java.lang.OutOfMemoryError in Tomcat then I realized What is Heap in Java or Java Heap Space.

Its happens with most of programmer because learning language is easy but learning basics is difficult since there is no formal process which can teach you every basics of programming its experience and work which reveals the secret of programming. For Java developer knowledge of Heap in Java, setting size of java heap space, dealing with Java heap space OutOfMemoryError, analyzing heap dumps is very important.

You should read Java Performance from Charlie Hunt to learn more about how to troubleshoot Java performance issue, profiling and advanced tools to take heap dump and analyse it to form problem areas. What is Heap space in Java? 1. 2. 3. C++ object-oriented questions. 'c' tag wiki. Index of /didattica/curriculum/marco/MAIN/didattica/TecnInternetWeb/java. Find All The Permutations of A String. Finding an algorithm to answer this question may seem challenging because finding all the different permutations of a string is something that you just do naturally without really thinking about it.

But, try to figure out what algorithm you are implicitly using in your mind whenever you write down all the different permutations of a string. Let’s use the word “dogs” as an example and see what different permutations we get. Here is what comes up when we list out all the possible permutations of the letters in “dogs”: dogs sgod gsod ogsd dosg sgdo gsdo ogds dsgo sdgo gdso osdg dsog sdog gdos osgd dgso sodg gods odgs dgos sogd gosd odsg So, when we came up with the permutations of “dogs” above, how did we do it? What were we implicitly thinking? Finding the permutations with recursion Our description of the process that we followed sounds a lot like something that could be solved with recursion.

Which letters can we use in a given position? Find all the permutations of a string in Java. Solutions to Google Top Interview Puzzles. To start with,we are posting solutions to some of the questions.In due course of time ,all the questions shall be solved. 1.There is an array A[N] of N numbers. You have to compose an array Output[N] such that Output[i] will be equal to multiplication of all the elements of A[N] except A[i]. For example Output[0] will be multiplication of A[1] to A[N-1] and Output[1] will be multiplication of A[0] and from A[2] to A[N-1]. Solve it without division operator and in O(n). Solution:At each position i,we need to assign A[i], the product of all the elements in the array except A[i].This amounts to same as putting A[i]=a*b,where a=cumulative product of all those elements to the left of A[i] and b=cumulative product of all those elements to the right of A[i].

We can put this simply by storing the result in a separate array and by traversing the input array twice. Output[i]=Output[i]*b; which amounts to putting Output[i]=a*b Below is a C function to do the same. Click here for the questions Hint: 1. 7. Programming puzzles, riddles and interview problems. Classic: If a bear walks one mile south, turns left and walks one mile to the east and then turns left again and walks one mile north and arrives at its original position, what is the color of the bear. ANS. The color of the bear is trivial. The possible solutions to it are interesting. In addition to the trivial north pole and circle near north pole solutions, there is an additional circle near south pole solution. 1. ANS. 2. HINT. 3.

Answer from Uday Venkat: weigh three balls against another three balls. if both weigh the same , then just weighing the remain two (one against one) will show the lighter ball. if the sets of three do not weigh equal, then weigh any two balls in the lighter set, one against the other . the balance will show if the lighter one is on the balance,if not the remaining one is the lighter one. (the numbers in the brackets are balls on either side of the balance) if both are equal, then 2= (1 + 1) done. else, from the lighter set of 3 3= (1 + 1) + 1 done. 4.

HINT. 5. Google Top Interview Puzzles. Google Fresher's latest Interview Questions. Question & Answer. PRACTICE. 17 Great Answers To 17 Job Interview Questions You Don't Want To Be Asked. Archive. Red Marbles, Blue Marbles Problem: you have two jars, 50 red marbles, 50 blue marbles. you need to place all the marbles into the jars such that when you blindly pick one marble out of one jar, you maximize the chances that it will be red. (when picking, you’ll first randomly pick a jar, and then randomly pick a marble out of that jar) you can arrange the marbles however you like, but each marble must be in a jar. Solution Chance! Chance is easy if you know how to do the formula. we know that we have two choices to make. first we’ll pick a jar, and each jar will have a 1/2 chance of being picked. then we’ll pick a marble, and depending how we stack the marbles, we’ll have a (# of red marbles in jar)/(# of total marbles in jar) chance of getting a red one. for example, say we put all the red marbles into jar A and all the blue ones into jar B. then our chances for picking a red one are: let’s look at those chances: it wasn’t really a good proof, but QED anyway :-P.

Discussion - Amazon Interview. Hi geeks, Yesterday I had Amazon Interview. I cleared the written test this 17th. The questions are here My todays interview questions are - Round 1: 1. 2. 3. 4. Round 2: 1. 2. 3. Round 3 (Design Round) 1. 2. 3. Round 4 1. 2. 3. Algorithm Design Manual – Solutions | panictank | Page 2. Yeah, new book series! I had laying this book around for about two and an half years and only read about a quarter of it but never worked through it. So, I decided to work through it and post interesting problems and solutions online. The book consists of two parts. The first part treats the algorithmic basics. The second part is just a reference of different algorithmic problems and ways to solve it. 1-1. . 1-2. And the result is 1-5. . , and a target number T, find a subset of S which adds up exactly to T. That adds up to but not .

(b) (c) 1-16. Which is true. The first term is parenthesis is our assumption and the second term is obviously divisible by 3, therefore we showed that our assumption is true. 1-26. NearestNeighbour createst shorter paths for small input graphs. 1-28. If we can find a bigger divisor we could speed it up. This works quite nice and can speed up the process substantially. Data Structures Archives » C code Champs. C Program to print strings in alphabetical order C Program to print strings in alphabetical order or Lexicographical order : As we all know there are several ways to sort strings alphabetically but using arrays is the easiest. Ordering Strings into alphabetical Read More » C Program to Concatenate two Strings using Arrays C Program to Concatenate two Strings using Arrays : There are lot of ways of concatenating strings in C programming, also there is standard function in C “strcat” to concatenate the strings.

C Program of Huffman coding using Greedy Algorithm Approach C Program of Huffman coding using Greedy Algorithm Approach : This code is not written by me. C program to add two polynomials using Linked Lists C program to add two polynomials using Linked Lists : Adding two polynomials is quite easy stuff when we do it manually but it requires a bit effort while programming it. C program to Find Minimum Spanning tree KRUSKAL’s Algorithm C program of circular queue using linked list.

TCS Placement Papers. Placement Papers with Answers - Largest Collection of Placement Papers and Interview Pattern.