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

SEARCH KEYWORD -- Sorting



  Sort an array with only one local variable

Array sorting algorithm question is frequently asked during technical interviews. There are lots of sort algorithms including bubble sort, selection sort, insertion sort, quick sort, merge sort etc. Usually interviewees will be asked to implement sort algorithms. But have you ever been asked to sort an array which you are allowed to define ONLY ONE local variable in your algorithm?  Bubble sort can be used to do this actually. Normally a bubble sort algorithm may need three local ...

   JAVASCRIPT,ALGORITHM,SORTING,BUBBLE SORT     2016-10-07 09:46:49

  sorting in C++: 3 times faster than C.

If you don't know C++ well, you might be surprised how fast C++ can be sometimes. This is especially true when code involved is small, because then inlining - which is what C++ is very good at - and templating, which makes excessive inlining possible in the first place - has the most effect. The following code compares C and C++ sorting:  #include <iostream>#include <algorithm>#include <vector>#include "stop_watch.inl" // see https://...

   C++,Sorting,C,faster,efficiency     2012-03-17 12:59:45

  CASSANDRA data model

Cassandra is an open source distributed database, it combines dynamic key/value and column oriented feature of Bigtable. Features of Cassandra are: Flexible schema, no need to design schema first, it's very convenient to add or delete strings Support range search on keys High usability, extensible. The single node error will not affect the cluster. We can think Cassandra's data model as a 4 or 5 dimensional Hash. COLUMN Columns is the smallest data unit in Cassandra, it is a 3 dimensional data...

   Cassandra,database,sort     2013-06-08 22:07:40

  How MySQL optmizes ORDER BY

In some situations, MySQL will just use an index to fulfill the requirement of an ORDER BY or GROUP BY statement without extra sorting. Although ORDER BY will not have the exact match with index, index can still be used as long as the portion that is not included in the index is included in the where clause. The following queries will all use index to process the ORDER BY or GROUP BY part: SELECT * FROM t1 ORDER BY key_part1,key_part2,... ;SELECT * FROM t1 WHERE key_part1=constant ORDER BY key_p...

   MySQL,index,ORDER BY,optimization     2012-11-13 11:01:05

  Computer skills one can learn within one day

Computer related technical skills are usually thought as complicated and difficult to understand. It's very difficult for one to get hands on one skill or master one skill. But if you really do want to learn something useful within one day, there are some good choices which will not take too long to get to know and use.. Version control:- Git, GitHub and SVN Regular expressions AWK sed Grep Learn how to do things with Vim that you never knew could be done. Set up a crawler that can scrape some ...

   Computer skills,Learn     2013-09-16 08:51:35

  Facebook appoints former Google engineer to improve its search function

Facebook has set up a new team to improve its search products, the team leader is Lars Rasmussen who was a former Google engineer..The team consists of more than 20 engineers which is led by Rasmussen. The main efforts are to achieve easier sorting for contents which are created by users on Facebook . This will help Facebook be a more powerful search engine, which not only allows the user to stay longer on Facebook, but also helps Facebook make more profits by selling keyword ads like ...

   Facebook,Search engine,Google,Like     2012-03-30 11:33:28

  How Query Optimizer Works in RDBMS

In a previous post, we discussed how the various relational operators are implemented in relational database systems. If you have read that post, you probably still remember that there are a few alternative implementations for every operator. Thus, how should RDBMS determine which algorithm (or implementation) to use? Obviously, to optimize the performance for any query, RDBMS has to select the correct the algorithm based on the query. It would not be desirable to always use the same algori...

   DATABASE,DATABASE DESIGN,DATABASE OPTIMIZATION     2019-04-20 07:26:32

  The 9 lines of code of Google

Are you still remembering the then hot debated news about Oracle suing Google allegedly copying a small portion of codes from Oracle's Java in 2010. At that time, Oracle experts estimated that Google owes Oracle between $1.4 billion and $6 billion in damages if liable. But the court thought Oracle was eligible only for statutory damages for that copying, which were not expected to exceed a few hundred thousand dollars. At last, Oracle agreed the zero damage result. Are you curious about whi...

   Google,Java,Open source     2014-08-15 20:29:52

  What I learned interviewing with Google

Over the last few weeks I’ve been interviewing with Google for a job doing primarily JavaScript development. I didn’t end up getting the job but I thought I would share the process of interviewing for Google as it was both very exciting and a humbling experience. I can’t reveal everything as I’m under a few NDAs. I’m not going to mention the products or teams that I was interviewing for but you may be able to guess. For those that don’t know me, IÃ...

   Google,Experience,Interview,Algorithm     2012-02-10 06:19:17

  5 Ways to Boost MySQL Scalability

There are a lot of scalability challenges we see with clients over and over. The list could easily include 20, 50 or even 100 items, but we shortened it down to the biggest five issues we see.1. Tune those queriesBy far the biggest bang for your buck is query optimization. Queries can be functionally correct and meet business requirements without being stress tested for high traffic and high load. This is why we often see clients with growing pains, and scalability challenges as their site becom...

   MySQL,Scalability,Methods,Implementation,Practice     2011-10-18 02:57:27