Antonio Gulli's coding playground

Random commentary about Machine Learning, BigData, Spark, Deep Learning, C++, STL, Boost, Perl, Python, Algorithms, Problem Solving and Web Search

Monday, August 31, 2015

Reverse the order of bits in an unsigned integer

Pubblicato da codingplayground a 8:58 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Sunday, August 30, 2015

Given a set S, compute the powerset of S

Pubblicato da codingplayground a 9:07 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Saturday, August 29, 2015

Add two decimal strings representing two integers

Pubblicato da codingplayground a 9:08 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Thursday, August 27, 2015

Generate all the bit patterns from 0 to 2^(n-1) such that successive patterns differ by one bit.

Pubblicato da codingplayground a 9:08 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Bellman-Ford – Given a graph G and a source vertex, find the shortest paths from the source src to all vertices. The graph may contain negative edges

Pubblicato da codingplayground a 12:26 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Monday, August 24, 2015

Represent unsigned integers with variable length encoding using the continuation bit

Pubblicato da codingplayground a 9:09 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Sunday, August 23, 2015

Represent an integer with variable length encoding using gamma encoding

Pubblicato da codingplayground a 9:09 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Saturday, August 22, 2015

Represent an integer with variable length encoding using delta encoding

Pubblicato da codingplayground a 9:10 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Thursday, August 20, 2015

Jump Stairs – There is a stair with n steps. You can climb either one step or two steps at a time. How many different ways there are to climb the stair?

Pubblicato da codingplayground a 12:05 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Wednesday, August 19, 2015

Compute the average with no division

Pubblicato da codingplayground a 9:11 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Tuesday, August 18, 2015

Max sub-array problem - given an array of integers, compute the largest sum continuous sub array

Pubblicato da codingplayground a 12:03 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Monday, August 17, 2015

Integer Knapsack – A knapsack has max capacity C and there are n items each with weight w[i] and value v[i]. Maximize the value in the knapsack without exceeding its max capacity

Pubblicato da codingplayground a 12:03 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Sunday, August 16, 2015

Edit Distance -– Given two strings, compute the edit distance between them

Pubblicato da codingplayground a 12:04 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Saturday, August 15, 2015

Neat Print – Given a sequence of words and a max number of words which can be put in a line, print the sequence of words neatly. Assume that no word is split across lines

Pubblicato da codingplayground a 12:04 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Friday, August 14, 2015

Eggs Drop – Given k eggs and n floors in a building, find the minimum number of trials required to determine the lowest floor from which an egg can be dropped without getting broken

Pubblicato da codingplayground a 12:05 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Thursday, August 13, 2015

Jumping Array – Given an array of non-negative numbers, start at the first element and reach the end with a minimum number of jumps. A jump cannot exceed the length contained in the current position.

Pubblicato da codingplayground a 12:05 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Wednesday, August 12, 2015

Dice -– Given n dice, count how many ways to get sum s.

Pubblicato da codingplayground a 12:06 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Tuesday, August 11, 2015

Given n dollars, how many different ways there are to make the change into a set of coins S?

Pubblicato da codingplayground a 12:06 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Monday, August 10, 2015

Longest Palindrome String – Given a string, compute the longest palindromic substring

Pubblicato da codingplayground a 12:07 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Sunday, August 9, 2015

LCS -– Given two strings S1 and S2, find the longest common substring

Pubblicato da codingplayground a 12:08 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Saturday, August 8, 2015

LCS -– Given two strings S1 and S2, find the longest common substring

Pubblicato da codingplayground a 12:09 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Friday, August 7, 2015

String Palindromes -– Given a string, find the minimum number of characters to be inserted for converting the string into a palindrome

Pubblicato da codingplayground a 12:08 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Thursday, August 6, 2015

Jumping Array – Given an array of non-negative numbers, start at the first element and reach the end with a minimum number of jumps. A jump cannot exceed the length contained in the current position.

Pubblicato da codingplayground a 12:06 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Wednesday, August 5, 2015

Given an array of integers, find the longest increasing subsequence

Pubblicato da codingplayground a 12:20 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

LCS – Given two strings, find the longest common subsequence

Pubblicato da codingplayground a 12:09 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Tuesday, August 4, 2015

Bridge Matching – n cities are on the northern bank of a river and n cities are on the southern bank. You can build a bridge only between cities with the same number

Pubblicato da codingplayground a 12:20 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Monday, August 3, 2015

LBS – Given an array of integers, find the longest bitonic sequence

Pubblicato da codingplayground a 12:21 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Sunday, August 2, 2015

Box Stacking – Given a set of 3d boxes, compute the largest stack of boxes. A box can be stacked only on top of another box with larger base.

Pubblicato da codingplayground a 12:21 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Saturday, August 1, 2015

Sum Subset -– Given an array of integers of size n, partition it in such a way that the two subsets have equal sum s

Pubblicato da codingplayground a 12:22 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Antonio Gulli

  • Gulli Family

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Search This Blog

Popular Posts

  • K-means in C++
    K-means is a classical clustering algorithm.. Here you have a C++ code for K-means clustering . (Edit: 12/05/013) See also my more rece...
  • Adaboost : improve your weak performance
    Adaboost is one of my favorite Machine Learning algorithm. The idea is quite intriguing: You start from a set of weak classifiers and learn...
  • Nearest Neighbour on KD-Tree in C++ and Boost
    Wikipedia describes the pseudo-code for computing the nearest neighbour (nn) on an already built KDtree. Here you have a boost implementatio...
  • place n queens on a chessboard
    typical recursive solution where we tentatively put a queen, if this doesn't violate conditions in column i. Then continue in  submatrix...
  • A robot is moving in a rectangular board
    It can move either down or right and the board is N x M. How many path does the robot have? Solution: Steps are N+M and we can chose N, ...
  • Discuss memory layout for C programs
    Ideally you should discuss all the different areas that are used
  • DBSCAN clustering algorithm
    DBSCAN is a well-known clustering algorithm, which is easy to implement. Quoting Wikipedia: " Basically, a point q is directly densit...
  • Design Patterns : C++ full collection of Gamma's patterns
    Full collection of Gamma's patterns in c++: Creational : Abstract Factory, Builder, Factory, Prototype, Object Pool, Singleton, Struct...
  • Learning linear regression with gradient descend
    Last week I restarted an old and good behavior (see  A collection of algos and data structures published here) . Every day, I take an well k...
  • PCA: Dimensional Reduction in Eigen
    PCA (Principal Component Analisys) is a classical machine learning method to reduce the dimensionality of a problem. PCA involves the calcu...

Antonio Gulli Google

Antonio Gulli Google
Google

Antonio Gulli Microsoft

Antonio Gulli Microsoft
Antonio Gulli Microsoft

Antonio Gulli Ask.com

Antonio Gulli Ask.com
Antonio Gulli Ask.com

Antonio Gulli Highlander

Antonio Gulli Highlander
Antonio Gulli Highlander

Antonio Gulli University

Antonio Gulli University
Antonio Gulli University

Antonio Gulli Elsevier

Antonio Gulli Elsevier
Antonio Gulli Elsevier

Antonio Gulli My Ferrari

Antonio Gulli My Ferrari
Antonio Gulli My Ferrari

Antonio Gulli My Search Engine

Antonio Gulli My Search Engine
Antonio Gulli My Search Engine

Antonio Gulli My Shipit Microsoft

Antonio Gulli My Shipit Microsoft
Antonio Gulli My Shipit Microsoft

Antonio Gulli My Patents

Antonio Gulli My Patents
Antonio Gulli My Patents

Antonio Gulli My Awards

Antonio Gulli My Awards
Antonio Gulli My Awards

Antonio Gulli My Awards

Antonio Gulli My Awards
Antonio Gulli My Awards

Antonio Gulli Image Search

Antonio Gulli Image Search
Antonio Gulli Image Search

Blog Archive

  • ►  2016 (2)
    • ►  May (2)
  • ▼  2015 (184)
    • ►  December (4)
    • ►  November (16)
    • ►  October (32)
    • ►  September (30)
    • ▼  August (29)
      • Reverse the order of bits in an unsigned integer
      • Given a set S, compute the powerset of S
      • Add two decimal strings representing two integers
      • Generate all the bit patterns from 0 to 2^(n-1) su...
      • Bellman-Ford – Given a graph G and a source vertex...
      • Represent unsigned integers with variable length ...
      • Represent an integer with variable length encoding...
      • Represent an integer with variable length encoding...
      • Jump Stairs – There is a stair with n steps. You c...
      • Compute the average with no division
      • Max sub-array problem - given an array of integers...
      • Integer Knapsack – A knapsack has max capacity C a...
      • Edit Distance -– Given two strings, compute the ed...
      • Neat Print – Given a sequence of words and a max n...
      • Eggs Drop – Given k eggs and n floors in a buildin...
      • Jumping Array – Given an array of non-negative num...
      • Dice -– Given n dice, count how many ways to get s...
      • Given n dollars, how many different ways there are...
      • Longest Palindrome String – Given a string, comput...
      • LCS -– Given two strings S1 and S2, find the longe...
      • LCS -– Given two strings S1 and S2, find the longe...
      • String Palindromes -– Given a string, find the min...
      • Jumping Array – Given an array of non-negative num...
      • Given an array of integers, find the longest incre...
      • LCS – Given two strings, find the longest common s...
      • Bridge Matching – n cities are on the northern ban...
      • LBS – Given an array of integers, find the longest...
      • Box Stacking – Given a set of 3d boxes, compute th...
      • Sum Subset -– Given an array of integers of size n...
    • ►  July (31)
    • ►  June (24)
    • ►  May (11)
    • ►  April (2)
    • ►  March (2)
    • ►  February (2)
    • ►  January (1)
  • ►  2014 (82)
    • ►  December (1)
    • ►  November (1)
    • ►  September (11)
    • ►  August (25)
    • ►  July (1)
    • ►  June (14)
    • ►  May (23)
    • ►  April (1)
    • ►  March (1)
    • ►  February (2)
    • ►  January (2)
  • ►  2013 (120)
    • ►  December (16)
    • ►  November (1)
    • ►  October (1)
    • ►  September (30)
    • ►  August (17)
    • ►  July (17)
    • ►  May (3)
    • ►  April (2)
    • ►  March (22)
    • ►  February (4)
    • ►  January (7)
  • ►  2012 (241)
    • ►  November (29)
    • ►  October (22)
    • ►  September (28)
    • ►  August (31)
    • ►  July (31)
    • ►  June (31)
    • ►  May (11)
    • ►  April (17)
    • ►  March (27)
    • ►  February (4)
    • ►  January (10)
  • ►  2011 (361)
    • ►  December (20)
    • ►  November (29)
    • ►  October (34)
    • ►  September (31)
    • ►  August (35)
    • ►  July (32)
    • ►  June (30)
    • ►  May (33)
    • ►  April (30)
    • ►  March (30)
    • ►  February (29)
    • ►  January (28)
  • ►  2010 (387)
    • ►  December (33)
    • ►  November (28)
    • ►  October (32)
    • ►  September (31)
    • ►  August (42)
    • ►  July (37)
    • ►  June (32)
    • ►  May (31)
    • ►  April (30)
    • ►  March (30)
    • ►  February (29)
    • ►  January (32)
  • ►  2009 (382)
    • ►  December (31)
    • ►  November (31)
    • ►  October (25)
    • ►  September (17)
    • ►  August (28)
    • ►  July (32)
    • ►  June (48)
    • ►  May (38)
    • ►  April (23)
    • ►  March (40)
    • ►  February (33)
    • ►  January (36)
  • ►  2008 (10)
    • ►  December (4)
    • ►  August (3)
    • ►  July (1)
    • ►  June (2)

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

My Blog List

  • Search Engine Land: News About Search Engines & Search Marketing
    -
  • My Biased Coin
    -
  • Mini-Microsoft
    -
  • Zen and the Art of Programming
    -
  • GeeksforGeeks
    -
  • Search Engine Watch Blog
    -
  • Geeking with Greg
    -
  • Process Algebra Diary
    -
  • Google News Blog
    -
  • Official Google Research Blog
    -
  • GigaOM
    -
  • TechCrunch
    -
  • Matt Cutts: Gadgets, Google, and SEO
    -
  • Inside Search
    -
  • Wolfram|Alpha Blog
    -
  • PeteSearch
    -
  • The Official Google Blog
    -
  • Twitter Blog
    -
  • my slice of pizza
    -
  • SEO by the Sea
    -
  • Computational Complexity
    -
  • in theory
    -
  • TechCrunch Europe
    -
  • John Battelle's Searchblog
    -
  • Microsoft Research Downloads
    -
  • Facebook Developer Blog
    -
All opinions are mine. Simple theme. Powered by Blogger.