Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Node.js



  Algorithm : Delete middle node from singly linked list

Questions about singly linked list are frequently asked during technical interviews. Today we will share with you one algorithm question about singly linked list. Here is the problem description. Assuming the only information you are giving is there is a pointer to a middle node of a singly linked list, no other information about the linked list is given. Please delete this node and don't affect the structure of the linked list. Initially you may think this question is easy if you know the hea...

   ALGORITHM,C,LINKED LIST     2015-10-30 05:21:25

  Algorithm : Reverse singly linked list

Questions about singly linked list are the lovers of interviewers during interviews given the characteristic that singly linked list is one-directional list and it's difficult to get the previous node of one node without some buffering tricks.  In this post, we will demonstrate one of the most frequently asked question about singly linked list -- Reversing the singly list. Given the first node of a singly linked list, reverse the singly linked list. For example : A->B->C->D After ...

   ALGORITHM,INTERVIEW,C     2015-10-31 11:38:35

  Binary tree iterator algorithm

Binary tree pre-order,in-order and post-order traversal are basics in algorithm and data structure.And the recursive binary tree traversal is a classical application of recursion. We define a binary tree node as : // C++ struct Node { int value; Node *left; Node *right; } In order binary tree traversal can be: // C++ void inorder_traverse(Node *node) { if (NULL != node->left) { inorder_traverse(node->left); } do_something(node); if (NULL != node->righ...

   Binary tree,Iterator,Traversal     2013-07-14 21:51:09

  What drives the popularity of Node.js?

JavaScript is a programming language which can be used on both front end and back end. Its popularity should mainly be attributed to its power in front end side. While people seem not realize its power in back end until the appearance of Node.js.  Node.js is a server-side software system designed for writing scalable Internet applications, notably web servers. Programs are written on the server side in JavaScript, using event-driven, asynchronous...

   Node.ks,Popularity,NPM     2013-07-24 01:22:58

  Tips and tricks about JavaScript from Google

JavaScript is now a very popular client side language. It's flexible, powerful but easy to make mistakes. So good programming style is better for you to write efficient and readable JavaScript codes. Here are some tips and tricks about JavaScript from Google. True and False Boolean Expressions The following are all false in boolean expressions: null undefined '' the empty string 0 the number But be careful, because these are all true: '0' the string [] the empty array {}&n...

   JavaScript, Google, Coding standard     2013-02-26 23:11:03

  Node.js: Five Things Every PHP Developer Should Know

I recently started working on a few Node.js applications. Coming most recently from PHP (and Drupal in particular), I found the transition to Node.js to be surprisingly easy. Pleasurable, in fact. But I had to learn to think differently about a few things. Below I list the five things I think every PHP developer should know about Node.js. 1. Node.js Is Built On Chrome's JavaScript Engine Google's browser, Chrome, has a notoriously fast JavaScript engine called V8. And this JavaScript engine ...

   PHP,Node.js,Developer,Feature     2012-02-09 07:37:48

  Why exception would be thrown when deleting element while looping through HashMap in Java

HashMap and other Collection types are frequently used in Java application programming. This post will explain why exception would be thrown when deleting element with Map.remove() while looping through a Map using Iterator. This issue would also occur to other Collection types such as Set, List. Below is a sample code snippet demonstrating the exception thrown. Map<String,String> map = Collections.synchronizedMap(new TreeMap<String,String>()); map.put("key1","value1"); map.put("ke...

   JAVA,HASHMAP,CONCURRENTMODIFICATIONEXCEPTION     2018-06-30 12:49:09

  Why does LinkedIn migrate to NodeJS from Ruby?

Node.js, the server-side JavaScript-based software platform used to build scalable network applications, has been all the rage among many developers for the past couple of years. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Because of these advantages, there are many websites are migrating to Node.js.One of them is LinkedIn. LinkedIn was initially built on Ruby...

   LinkedIn,NodeJS,Ruby     2014-03-21 23:39:25

  Redis Cluster and Common Partition Techniques in Distributed Cache

In this post, I will discuss a few common partition techniques in distributed cache. Especially, I will elaborate on my understanding on the use of Redis Cluster. Please understand that at the time of writing, the latest version of Redis is 4.0.10. Many articles on the same topic have a different idea from this post. This is mainly because, those articles are probably outdated. In particular, they may refer to the Redis Cluster implementation in Redis 3. Redis Cluster has been improved...

   REDIS,DISTRIBUTED CACHE,CLOUD COMPUTING     2019-01-17 08:10:37

  Canonicalize XML in Java

XML canonicalization is often used when there is need to create digital signature to be sent to peers for verification. Since digital signature is created based on XML data, the XML data has to be canonicalized before its signature value can be calculated. Even an extra space may affect the signature value calculated, hence it must follow some rules to canonicalize the XML data so that it has a standard format. This is why W3C created specification Canonical XML Version 1.1. This specificat...

   JAVA,XML,JAVA SECURITY     2016-01-20 01:39:45