Towering ‘Cristo Redentor’ (Christ the Redeemer) Gazes out upon Rio de Janeiro, Brazil

Enormous Christ the Redeemer Statue in Rio de Janeiro

The statue of Christ the Redeemer bestrides a 2,300-foot mountain named Corcovado (“Hunchback”), weighing 635 tons, standing 130 feet tall, and measuring 98 feet from the tip of one outstretched hand to the other. The statistics alone are awe-inspiring.

The striking figure of the enormous Christ the Redeemer statue can be seen from almost any point in the city of Rio de Janeiro. Christ the Redeemer gazes out upon a city celebrated more for the pleasures of its flesh than for the saintliness of its sculptures.

However, the unique place that Cristo Redentore occupies in the hearts of all Brazilians depends on its sheer visibility. There’s scarcely a sunlit beach or a shadowy favela (shanty town) in the entire city from which the massive, reinforced concrete and soapstone image of the Saviour cannot be seen, his arms held apart in distant benediction.

The absolute scale of the structure means that humans are dwarfed when they stand at its foot—only by leaning back at an impracticable angle can they glimpse the carved features of Christ. In addition, of course, while many choose to look upward to mull over the face of divine power, others direct their gaze downward, over the spectacular panorama that encompasses both the natural splendors of the nearby coastline and the rampant urban sprawl that characterizes the restlessness of Rio.

Cristo Redentore, Rio de Janeiro Given the difficulty in accessing the site, up torturous, twisting roads, it’s not hard to believe that the statue took nine years to build, between 1922 and 1931. Nor that in a intensely Catholic country, a small chapel should have been built within its base dedicated to the Marian apparition, Nossa Senhora Aparecida (“Our Lady of the Apparition”), patron saint of all Brazil.

Symbol of hope, constant reminder of God’s presence, Christ the Redeemer serves not just as the guardian of the people who live in its shadow, but also as a steady companion through all their joys and travails. Although it stands thousands of feet above sea level, the statue’s foundations are rooted in Brazil’s very soul.

Architectural Highlights of The Bangalore Palace

Architectural Highlights of The Bangalore Palace

The Bangalore Palace is one of the most magnificent heritage buildings in the city of Bangalore. Though there are hundreds of heritage buildings in Bangalore, this one differs from all of them both in style and exuberance.

Originally it was a private building belonging to an Englishman by name N. Garrett, who was the first Principal of the Central High School in Bangalore, now known as Central College. It was purchased for the Maharaja in 1884 and the palace was built in 1880 at a cost of 10 lakhs of rupees. The total area of the palace is 45,000 square feet. The construction of the palace was started in 1862 and completed in 1944.

Bastion-like Towers in Bangalore Police The importance of this palace lies in the fact that it is built on the model of the Windsor Castle, the royal residence at Windsor in the English county of Berkshire. It is a two storied granite building with fortified towers and turreted parapets which are the characters of the Tudor architecture of England. The resemblance is so marked that many scholars feel that this is an imitated version of the Tudor’s building as if it was transported to Bangalore. It has Roman pointed arches and bastion-like towers. Its layout is rich in pointed recesses which add majesty to the contour of the building. Another attraction of this structure is a large number of projections which result in pleasing geometric patterns of varied designs. The facade of the palace is exotic with a combination of tall watch-towers, spacious walls with square and arch-type windows and roundish structures, showing different levels of the roof.

Living quarters for the Maharani were added in 1890. But they were built in the Hindu architectural style and were connected to the main building by a covered pathway. The interior of the palace is full of decorations, molded and fluted pillars and large arches, walls decorated with floral patterns, intricately carved capitals, patterned cornices … all of a high order befitting a palace. Gorgeous chandeliers of great beauty have added a grace and charm to the interior.

Another attraction of this palace was the vast garden under the guidance of Sri N Venkatasamiraju, whose life-size statue adorns a niche in the palace. The vast open area round the palace in a heavily populated city, has added a great luxury to the edifice which itself is an epitome of luxury and royalty of the Maharajas of Mysore whose name and fame has spread far and wide including foreign lands. Thus this is one of the finest palaces in India.

How Larry Page, Sergey Brin, and Marissa Mayer Process Emails

How Marissa Mayer Handled Email while at Google

How Marissa Mayer Handled Email while at Google In an interview with tech journalist David Kirkpatrick for Fortune Magazine’s “Secrets of greatness: How I work” series, Marissa Mayer revealed how she processes emails. Marissa was then the Vice President of Search Products and User Experience, and is presently the CEO of Yahoo!

I don’t feel overwhelmed with information. I really like it. I use Gmail for my personal e-mail—15 to 20 e-mails a day—but on my work e-mail I get as many as 700 to 800 a day, so I need something really fast.

I use an e-mail application called Pine, a Linux-based utility I started using in college. It’s a very simple text-based mailer in a crunchy little terminal window with Courier fonts. I do marathon e-mail catch-up sessions, sometimes on a Saturday or Sunday. I’ll just sit down and do e-mail for ten to 14 hours straight. I almost always have the radio or my TV on. I guess I’m a typical 25- to 35-year-old who’s now really embracing the two-screen experience.

How Larry Page / Sergey Brin Handle Email at Google

Ever wonder how CEOs of large companies manage and process the hundreds or thousands of emails they receive daily?

Larry Page and Sergey Brin, co-founders of Google In a thread on managing loads of email, Quora user David Shin, who previously worked at Google, remembers Page and Brin being asked this question during a Q&A session at Google. When someone asked how they manage their email, one of them (he can’t remember which) responded like this:

When I open up my email, I start at the top and work my way down, and go as far as I feel like. Anything I don’t get to will never be read. Some people end up amazed that they get an email response from a founder of Google in just 5 minutes. Others simply get what they expected (no reply).

Natural Beauty amongst Incredible Rock Formations in Utah’s Zion National Park

The Narrows (Virgin River) in Zion National Park, Utah

The oldest of Utah’s national parks, Zion was first brought to broader attention by ground-breaking Mormon settlers in the 1860s who commended its glory. One of the pioneering Mormons, Isaac Behunin, gave the canyon its biblical name.

Excavated by the Virgin River eons ago, Zion Canyon is a deep cavern in the earth, showcasing incredible rock formations in concert with the tranquil water in motion. The walls of red-and-white Navajo sandstone that launch parallel up to 2,000 feet were carved by the unyielding Virgin River, though this may seem quite unlikely today as the river meanders peacefully along the bed of the canyon, constructing a mesmerizing oasis of waterfalls and untamed meadows. If you have the time, Zion National Park’s 229 square miles of remarkable landscape can cater for a wide range of appealing sports, as well as hiking, bicycling, riding, rock climbing, and rappelling.

Zion Canyon in Zion National Park The idyllic headquarters from which to commence into such a throng of activity—or simple meditation, if you wish—is a mere three-minute drive from the park’s eastern entrance at the suitably rustic and splendidly charming Zion Mountain Resort. Accommodation can be found in cozy wooden cabins for couples and roomy lodges for families and larger groups, all with magnificent views across the mountains. In close proximity are grazing buffalo, carelessly roaming the open plain as guests unwind on concealed patios or let everything go in a hot tub after the physical exertions of the day. The resort is also within relaxing driving distances of numerous additional parks and monuments— remarkably Bryce Canyon and the northern rim of the breathtaking Grand Canyon.

The Indispensable Guide to Sake and Japanese Culture

Sake Ceremony in Japan

An Introduction to Sake and Japan

The Japanese archipelago stretches over 3,000 km from north to south. Therefore, there are various lifestyles and customs. In addition, Honshu (the main island) is divided into the Pacific Ocean side and Japan Sea side by it’s over 1,000-meter elevation backbone ridge. This further results in different lifestyles and customs.

Therefore, the various cultures such as food and drink, festival rites, and folk entertainment have developed according to the climate of the plains, basins, mountains, and seasides. Since there had been almost no historical influence of politics and religion, the cultures of each small local community have been well preserved.

Despite this history, the pursuit of higher-quality sake has progressively evolved.

For example, in ancient times, it was the custom for the people in each region to brew and drink sake with Shinto deities after offering it to those deities at festivals and events. The main sake was called doburoku (unrefined sake). However, such a tradition has declined these days.

More ancient sake, such as kuchinokami-no-sake (sake made from rice or other cereal which is chewed to promote fermentation) and shitogi-zake (sake made from powdered rice which is also chewed) were recorded but the details have not been confirmed.

Seishu (refined sake) is the symbol of present-day sake. In the urban areas, this dates back to the Edo period (17th to 19th century). However, for the farming, mountain, and fishing villages, it was after the Meiji era (19th to 20th century) with the development of brewing techniques and distribution channels.

Present-day sake is made with high-quality standards for a refined taste and is easily available.

However, this standardization does not necessarily mean the decline of the cultural aspects of sake. The relationships of festival rites and sake, appetizers and sake, and containers and sake pass on the unique Japanese tradition, although the differences of the regions are declining.

By striving for the excellent taste and recounting the history of sake, we hope to pass on this part of Japanese culture to future generations and the international community.

History of Sake

History of Sake

Sake is made from rice. In Japan, sake has been consumed since ancient times. Of course, it is not exactly the same sake as what we have these days. The technique has advanced over time to the present day. Considering that the common ingredient, rice, is both the staple of Japanese food and the main ingredient of sake, this history goes back about 2,000 years.

The brewing of sake is a complex process. First, the rice starch needs to be converted into sugar. Then sugar is converted by kobo (yeast) into alcohol. The present, established method of converting starch into sugar is by koji-kin (aspergillus mold), the same process used since the fourth century. Until that time, sake was brewed by a method such as kuchikami-sake (sake made from rice or other cereal, which is chewed to promote fermentation.)

The organization called Miki-no-Tsukasa (sake brewery office) was established by the Imperial Court and started brewing sake for the ceremonies during the Heian period (eighth to 12th century). During the Muromachi period (15th century), hundreds of small-scale sake shops were born in Kyoto and sake came to be brewed throughout the year. At the same time, the brewers of soboshu, sake brewed in temples in Nara and other places, came to lead the development of brewing techniques.

Since then, the technical development with consistent quality has progressed and from the middle of the Edo period (around 18th century), the brewing technique was established and is similar to the technique used today.

First, koji-kin (aspergillus mold) is carefully grown over the steamed rice to make komekoji (malted rice). Then, to komekoji, steamed rice and water are added to make the fermentation starter, shubo (yeast mash). After that, the fermentation is promoted by the method called danjikomi (three-step fermentation process) by adding steamed rice, komekoji, and water three times. After the fermentation, sake is filtered, pasteurized at low temperature, stored, and matured. This production method requires very complex, advanced skill.

At around this time, it became popular to concentrate brewing sake in the best season, winter. This technical development gave rise to the special professional group of sake brewing consisting of toji (chief sake brewer) and kurabito (a worker at a sake brewery.) Migrant workers mainly from farming villages during agricultural off-season became the professional group.

It was also discovered that the quality of water used in brewing had an effect on the brewing of sake. It was the development of the breeding of rice, brewery science, and manufacturing facilities after the Meiji era (19th to 20th century), which marked the beginning of modern Japan, that established the modern brewing process. However, the skill involved with the multiple parallel fermentation process, which converts rice starch into sugar by koji-kin (aspergillus mold) and converts sugar into alcohol by the power of kobo (yeast) simultaneously, has not changed even today.

The fermentation method, which performs simultaneous saccharification of rice and alcoholic fermentation of sugar. With this method, the putrefaction risk becomes lower and alcohol content becomes higher than saccharifying and fermenting alcohol separately.

Various Sake Produced in Climate Conditions of Japan

Japan, which is situated off the northeast portion of the Eurasian continent is a long arc-shaped island country, surrounded by the Kuroshio (warm current) flowing from south to north and the Oyashio (cold current) flowing from north to southwest. The climate varies greatly from north to south and from the Pacific Ocean side to the Japan Sea side. Japan also belongs to the temperate monsoon region and experiences four seasons. However, due to the central mountain range that divides the archipelago, the character of the climate, even at the same latitude, is quite different from the Pacific Ocean side to the Japan Sea side.

As a result, the farm and marine products are very different in each region. Although food from all over the country is available these days, it was in the past the custom for the Japanese to eat local food using local recipes. Therefore, traditional Japanese cuisine is as diverse in flavor, seasoning, and cooking methods as each region.

As a result, the basics of brewing sake in over the 1,000 breweries in Japan are to match the sake to the local diet. For example, there is many red fish caught from the Pacific Ocean, white fish from the Seto Inland Sea, and fatty fish from the Sea of Japan because of the extremely cold winters. Food preservation developed in the inland provinces. In addition, some breweries brewed sake for Edo (present-day Tokyo), which was the world’s largest consumer city during the Edo period (17th to 19th century). Brewing sake for each lifestyle and diet was developed and refined for each region.

Even now, the Japanese cultural sensitivity to the four seasons is reflected in how sake is consumed. Each season brings us a different type of sake and a different way to drink it. In autumn, we have hiyaoroshi, which is sake well matured over the summer; in the winter to early spring, shiboritate (fresh sake) with a fresh flavor; in the hot summer, namazake (unpasteurized sake), which is cooled in the refrigerator. Some prefer to drink sake cold or at room temperature called hiya (unwarmed sake). On the other hand, even these days, others prefer the traditional drinking custom of kanzake (warmed sake) from autumn to spring.

Sake and Japanese Cuisine

Recently, a technical approach to sake brewing has developed. There are the traditional kimoto and yamahai with a sour and thick taste; and daiginjo (very special brew) with the fruity taste using highly polished rice and brewing at a low temperature. Recently, sparkling sake is being produced.

The traditional method of growing of active kobo (yeast) through the action of lactic acid produced by natural lactic acid bacterium while preventing other bacteria activity.

Yamahai operates kimoto-type shubo (yeast mash) growing method which cut the operation procedure called yamaoroshi, grinding rice during the process of active kobo.

Most importantly, the quality control of sake after shipping is essential for enjoying the delicate taste and different flavors. The reason for the sake containers to have lightproof brown or UV-cut bottles is to reduce the sunlight, the most dangerous factor for preserving sake. For drinking delicious sake, it is important to store it in a cool, dark place.

Three Reasons Why Sake Goes Well with Japanese Cuisine

A distinct flavor produced from the brewing of sake is called umami, or savory good taste. These days, sake is consumed with a variety of delicious foods. However, traditionally, it was consumed with a simple appetizer called sakana. The variety of conditions spanning east to west in Japan has produced a diversity of flavors complimentary to the local sake.

  1. Sake contrasts well with salty foods. Because the Japanese summers are hot and humid, salted seafood evolved as a preservative over smoked foods. Therefore, many appetizers that are consumed with sake are high in salt content. Shiokara (salted and fermented fish innards) and naresushi are such examples. It was also common to have sake with salt and miso (fermented soybean paste) only. The umami character of sake goes well with the salty taste of these appetizers.
  2. Sake complements fermented foods. The variety of ingredients used in Japanese cuisine results in unique seasonings. Common seasonings such as shoyu (soy sauce), miso, komesu (rice vinegar), and mirin (sweet sake for cooking) are all fermented using koji (malted rice). In particular, shoyu and miso, like sake, are uniquely developed in each region and have become the main taste of the local cuisine. The predominant use of fermented foods and almost no use of oils and fats are the features of “Washoku: Traditional Japanese Dietary Cultures” listed on UNESCO’s Intangible Cultural Heritage list.
  3. Sake is good in recipes for cooking. The variety of fish, which Japanese people prefer to eat, is rich in minerals and calcium, more than that of Western food. Sake goes well with these flavors. Additionally, it has a good masking effect to remove the odor of raw fish. Therefore, sake is often used, not only as a drink, but also as a cooking ingredient. For these reasons, sake goes well with Japanese cuisine.

The good taste and the variety of qualities of present-day sake have not only become popular over a wide range of Japanese cuisine. It has also become popular with international dishes including fatty meats.

Sake Strongly Connected with Traditional Ceremonies

Shinto is a polytheistic belief system based on nature and ancestor worship. As such, there are many Shinto deities throughout Japan. Based on farming culture, Japan cultivates rice in the northernmost possible location of the world. Rice produced under these severe weather conditions has become the most precious staple food for the Japanese. It has been ancient tradition to celebrate the good harvest and express gratitude by offering sake to the deities. The food and sake offerings to the deities are called shinsen. Although there are various offerings for each region, the essential ones are as follows: miki (sake made from fermented rice), mike (washed rice or boiled white rice), and mikagami (round rice cake made from pounded steamed rice).

These days, the Japanese people eat rice throughout the year as a staple food. However, in the older days, people used to eat katemeshi, rice mixed with crops such as millet as a staple food, eating pure rice only on honored days such as ceremonies. In addition, sake made from the abundance of valuable rice and through much effort has become the most important part of these offerings.

Drinking sake with the deities and offering gifts to them on festival days are traditions passed on to today. Even today, the summoning of the Shinto deities is a tradition that is preserved throughout Japan.

For example, the ceremony jichinsai, for the construction of the new buildings, is performed by sprinkling sake over the property and offering it to the owners. Furthermore, Japan celebrates four distinct seasons with a festival called Sekku, performed at the turning point of each season. Although it has been simplified in recent years, it used to be the custom to float seasonal flower petals on sake, admire the flowers, and drink sake. For example, peach sake in March, sweet-flag sake in May, and chrysanthemum sake in September. People drink it to ward off evil spirits and wish for a long life. Also, on New Year’s Day, there is a custom by which people wish the peace for the new year by drinking sake called toso, a mixture of about ten kinds of herbs mixed with seishu (refined sake).

While feeling the change of each season, we Japanese hope to cherish those events by celebrating with sake and strengthen the ties now and forever.

Sake in Japanese Wedding Ceremony

Sake Necessary for Social Bonding

Since ancient times, Japanese have used sake as a way to create special bonds with each other. Sakazukigoto is a ceremony meaning the exchanging of sake cups. San-san-kudo is the most popular type of ceremony. After pouring sake, each person takes three sips of sake from each of three kinds of cups: large, middle, and small. It is important to sip three times as the number three is considered lucky. Especially in wedding ceremonies, san-san-kudo is usually performed while making vows before Shinto deities.

Outside of weddings, a custom called katame-no-sakazuki (ceremony of exchanging sake cups as a pledge of friendship) is used when people with no blood relationship become sworn brothers or a parent and a child. The phrase, “exchanging sake cups,” has a similar meaning as “contract” in Western societies. The phrases “drink sake together” and “eat out of the same pot,” mean closer relationships without any special contracts.

During present-day Japanese banquets, we often hear the phrase like “let’s do without the formalities and make ourselves at home today.” This means that there is no distinction between social statuses for developing relationships. Usually organizers and guests of honor give the opening speech to propose the toast saying, “kampai” at the beginning of the banquet. Kampai means to dry or empty a glass. It is a Japanese word to express not only a toast, but also a feeling of cultural bonding.

After this reiko (formal ceremony) people start bureiko, an informal party. The phrase, “we wish you continued success and prosperity …,” is usually used to propose a toast of kampai.

The word kinen means, “praying to the deities” In short, the original traditional ceremony sakazukigoto (ceremony of exchanging sake cups) is symbolized in the act of the toast, kampai, as the simplified confirmation of the purpose of the gathering. Therefore, we make a toast, kampai, with sake to pray to the deities.

Originally, it was common that people drank sake not only for auspicious occasions but also for funerals and Buddhist services. People drank sake to bid farewell and to remember the deceased. For important emotions in Japanese life, sake was indispensable.

Sake in Gift Exchange Culture

Gift Exchange Culture and Sake

It is ancient tradition and customary for people to exchange sake as gifts. First, sake is indispensable as the offering to the deities.

People bring sake as the celebration gift on New Year’s holidays and at festivals saying the words such as “we offer this to Shinto deities” or “we offer this to Buddha.” After offering sake to the deities, people commenced with osagari, consuming sake with the deities. Therefore, sake is indispensable as the gift on festival days.

Also since ancient times, sake has been used as the expression of sympathy and condolences. It was especially important to give sake as an expression of sympathy in the case of fires and disasters. It was custom for neighbors to help clear debris of fires and disasters. It was also custom to bring sake to encourage good feelings and restore good luck. As such, the custom of bringing sake as the expression of sympathy after fire and accidents was established.

There are other Japanese unique gifts called o-chugen in summer and o-seibo at the end of the year. These are gifts from one person to another to express gratitude for their help. The gift-giving custom of o-chugen and o-seibo started during the Edo period (17th to 19th century) when subordinates gave gifts to superiors as a token of their gratitude. In return, the superiors would give back a gift, twice of value, called baigaeshi. Soon after, this custom became popular regardless of social rank. The main gift was sake.

Although modern society has a variety of items for gift giving, the custom of giving gifts as religious offerings, expressing sympathy, and o-chugen and o-seibo are deeply rooted in Japanese society. Sake still shows its presence as one of the main gift items.

Development of Sake and Its Distribution

Originally, sake was brewed in each region throughout Japan as local production for local consumption. From the late Muromachi period (16th century) to the early Edo period (17th century), the brewing industry was concentrated in the Kinki region such as Nara, Fushimi, and Itami.

This changed during the Edo period (17th to 19th century) because of a peaceful 300-year reign of the Tokugawa shogunate and a developing economy. Since the population of Edo (present-day Tokyo), the center of politics, was already over one million, there was a strong demand for sake there. In addition, the shogunate and related domains strictly controlled the licensing system for production and sales of sake.

Present-day Nada in Hyogo Prefecture, the largest sake-producing district, grew as the largest sake supplier for Edo. Originally, the Kansai region had the concentration of sake brewing techniques from the Nara period (eighth century). Also, the extremely cold winter climate was suitable for brewing sake. In addition, an abundant supply of hard water called miyamizu, suitable for brewing sake, was discovered there.

As it was located near Osaka, the center of the nation’s economy, a special sea route using a ship called tarukaisen was established for shipping the sake to Edo. Although it had several sea routes surrounding the Japanese archipelago, throughout the Edo period, the original purpose was for the transport of sake.

The sake wholesale district in Edo, Shinkawa, which was established as the shipping discharge base in Edo, became the largest base of sake distribution in eastern Japan. Sake brewing in Nada was developed to the taste of urban residents of Edo. Nada thus grew as the representative sake-producing district in Japan. Because of the abundance of sake shipped to Edo, it was easily available to the population.

Since the main distribution system moved from maritime to railroad in the Meiji era (19th to 20th century), several sake brewery districts were established mainly for selling outside of their own area: Fushimi in Kyoto Prefecture, Saijo in Hiroshima Prefecture, and Jojima in Fukuoka Prefecture.

Nowadays, people can drink various locally brewed sake quite easily throughout Japan owing to the development of reliable logistics systems. Presently, the most productive districts of sake are Hyogo Prefecture, Kyoto Prefecture, Niigata Prefecture, Saitama Prefecture, Akita Prefecture, and Aichi Prefecture.

Sake as the National Alcoholic Drink of Japan

Presently in Japan, people can drink various types of alcohol such as beer, wine, and whiskey along with various foods from all over the world. It was important for us to understand and respect the cultural backgrounds of each country as we consume a variety of traditional food and drink of each of those countries.

Although the Japanese diet has undergone many changes, the conventional Japanese cuisine and sake are being seen in a new light. At the same time, the cultural and historical significance of Japanese cuisine and sake have come to attract people’s attention as well.

The reasons why sake qualifies as “the national alcoholic drink of Japan” are the followings: it is made from rice and water, the blessings of Japanese climate; it has the unique technique of using koji-kin (aspergillus mold) grown by the blessed climate of Japan; it has the history that people have consumed it for a long time throughout Japan; it has the strong connection with Japanese native beliefs, traditional annual events, and lifestyle; and it is brewed all over Japan.

Therefore, cherishing “the national alcoholic drink of Japan” is none other than being proud of Japanese culture. Of course, it is also important to deepen the mutual understanding by respecting foreign cultures, histories, foods, and alcoholic drinks. Japanese sake has been recognized overseas as the word, “sake.” Furthermore, recently the words such as ginjo (special brew sake) and junmai (pure rice sake) have become popular as well. In recent years, the export volume of sake for overseas has increased favorably.

The Japanese have promoted sake overseas as the representative of Japan, in other words, “the national alcoholic drink of Japan.”

C/C++ Implementation for Longest Common Substring Algorithm

C++ The longest common substring problem is to find the longest string that is a substring of two or more given strings.

You can build a generalized suffix tree for a set of strings with multiple strings using this implementation. A suffix tree contains all the suffixes of the given text as their keys and positions in the text as their values.

string longestCommonSubstring(const string& str1, const string& str2)
{

  if(str1.empty() || str2.empty())
  {
    return 0;
  }
 
  int *curr = new int [str2.size()];
  int *prev = new int [str2.size()];
  int *swap = NULL;
  int maxSubstr = 0;
   string longest;
 
  for(unsigned int i = 0; i < str1.size(); ++i)
  {
    for(unsigned int j = 0; j < str2.size(); ++j)
    {
      if(str1[i] != str2[j])
      {
        curr[j] = 0;
      }
      else
      {
        if(i == 0 || j == 0)
        {
          curr[j] = 1;
        }
        else
        {
          curr[j] = 1 + prev[j-1];
        }

          if(maxSubstr < curr[j])
        {
          maxSubstr = curr[j];
             longest.clear();             
        }

          if (maxSubstr == curr[j])
          {
            longest += str1.substr(i - maxSubstr + 1, i + 1);
          }
      }
    }
    swap=curr;
    curr=prev;
    prev=swap;
  }
  delete [] curr;
  delete [] prev;
  return longest.substr(0, maxSubstr);
}

C/C++ Implementation of Levenshtein Distance Algorithm for Approximate String Matching

C++ The Levenshtein is a measure of how costly it is to adapt a string into another one. If you assign a cost to adding a single character, switching one character for another, and removing a character then you can compute the cost between any two given strings.

Changing a character can be seen as removing a char and adding another one so when adding has cost 1 and removing has cost of one a modification has cost of 2.

The difference between two strings can also be measured in terms of the Levenshtein distance: the distance measure if you think the cost as the “distance” between two strings.

Text comparison is becoming an ever more relevant matter for many fast growing areas such as information retrieval, computational biology, online searching. Levenshtein distance can be used mostly to edit distance, explaining the problem and its relevance.

int levDistance(const std::string source, const std::string target)
{

  // Step 1

  const int n = source.length();
  const int m = target.length();
  if (n == 0) {
    return m;
  }
  if (m == 0) {
    return n;
  }

  // Good form to declare a TYPEDEF

  typedef std::vector< std::vector > Tmatrix; 

  Tmatrix matrix(n+1);

  // Size the vectors in the 2.nd dimension. Unfortunately C++ doesn't
  // allow for allocation on declaration of 2.nd dimension of vec of vec

  for (int i = 0; i <= n; i++) {
    matrix[i].resize(m+1);
  }

  // Step 2

  for (int i = 0; i <= n; i++) {
    matrix[i][0]=i;
  }

  for (int j = 0; j <= m; j++) {
    matrix[0][j]=j;
  }

  // Step 3

  for (int i = 1; i <= n; i++) {

    const char s_i = source[i-1];

    // Step 4

    for (int j = 1; j <= m; j++) {

      const char t_j = target[j-1];

      // Step 5

      int cost;
      if (s_i == t_j) {
        cost = 0;
      }
      else {
        cost = 1;
      }

      // Step 6

      const int above = matrix[i-1][j];
      const int left = matrix[i][j-1];
      const int diag = matrix[i-1][j-1];
      int cell = min( above + 1, min(left + 1, diag + cost));

      // Step 6A: Cover transposition, in addition to deletion,
      // insertion and substitution. This step is taken from:
      // Berghel, Hal ; Roach, David : "An Extension of Ukkonen's 
      // Enhanced Dynamic Programming ASM Algorithm"
      // (http://www.acm.org/~hlb/publications/asm/asm.html)

      if (i>2 && j>2) {
        int trans=matrix[i-2][j-2]+1;
        if (source[i-2]!=t_j) trans++;
        if (s_i!=target[j-2]) trans++;
        if (cell>trans) cell=trans;
      }

      matrix[i][j]=cell;
    }
  }

  // Step 7

  return matrix[n][m];
}

Visit the Jain Temples of Ranakpur, Rajasthan, India

Ranakpur's Jain Temple

Deep in the Aravali hills of the northwestern state of Rajasthan in India, between Udaipur and Jodhpur, stands the stunning fifth-century Jain temple of Ranakpur. Carved exclusively out of white marble and surrounded by green forest, the temple surveys its surroundings in each of the cardinal directions from its chaumukha, or “four faces”. Fortress-solid, great slabs of stone rise out of the ground to hold up the bulk of the temple’s extravagant exterior, a flamboyant edifice of cupolas, domes and turrets of soft grey marble.

In the interior, 1,444 intricately carved pillars hold up the roof, each one unique in its design. Soft light filters through the marble, changing its color from grey to gold, as the sun moves across the sky. Only the saffron and red fabrics of robes brighten up the surroundings as the monks and pilgrims pass between the pillars, through pools of light into shadow.

Temple to Adinath the first Tirthankara In the 15th century a Jain businessman named Dharma Shah had a vision that he should build a magnificent temple in honor of Adinath, the first Tirthankara (enlightened being) and founder of Jainism, also known as Rishabhadeva. He approached the local monarch, Rana Kumbha, to ask him for land on which to build. The king obliged him, and the temple was named “Ranakpur” in gratitude for his munificence.

The result is one of the most pleasant religious edifices in India. The temple is still in constant use and visitors are welcome, although, according to the Jain principle of ahimsa (non-violence to all things), they are asked not to bring any leather into the temple, including shoes. As you walk through Ranakpur, past delicate marble carvings and solemnly praying monks, the loving artisanship of so many individual souls is striking, and the atmosphere of devotion utterly absorbing.

PHILIPPINES: The Best Sights, Destinations, and Experiences (ASEAN Travel)

Best Destinations in Philippines

This is a cocktail of a country, potent and heady. The Philippines does not believe in leaving anything out, so its 7,000-plus islands boast Malay, Chinese, Spanish and indigenous influences, not to mention religious traditions rooted in Islam. Catholicism, animism and everything in between. This country crams as much on its plate as it possibly can, so you will need a clear head to take it all in.

Philippines: At a Glance

Experience the Best Attractions of Philippines

  1. Intramuros, Spanish Walled City within Manila A Shot of Culture: Intramuros, the Spanish walled city within Manila, has a history and culture all its own, and is worth spending a day or two exploring. Start at the Intramuros Visitors Centre, located right by the entrance to Fort Santiago, and wander about the lanes lined with lovely casas until you reach San Augustin, Manila’s oldest stone church. You can also tour Intramuros on a kalesa—a horse-drawn carriage, though walking has its own charm.
  2. Surfing in Siargao, Mindanao, Philippines Surf’s Up: If your beach bum-turn-surfer self is calling out to you, head to Siargao, in the northeast of Mindanao. Time seems to stand still here, as you hitch rides on the famous Cloud 9 break and gaze, over chilled beer, upon skies softening into sunsets. In October, crowds descend on the sleepy island for the Siargao Cup surf competition, one of the Philippines’s largest sporting events.
  3. Puerto Princesa Subterranean River, Philippines A Whole New World: The Puerto Princesa Subterranean River is a marvel of limestone stalactites and stalagmites, and can be accessed on a kayak tour. As you drift into the cave, take in the weird formations sculpted out of the rock over the centuries. You will spot a melting candle by one side, or a rampaging dinosaur on the other!
  4. Apo Reef Island, Philippines Fall Off the Grid: Apo Reef is off the tourist map, which means that you will have the secluded Apo Reef Island and its surrounding reef pretty much all to yourself. You will have a great time being one with the fish as you swim, snorkel, and dive to your heart’s content, emerging only for meals of fresh seafood.
  5. Taal Volcano in Talisay, Philippines An Active Getaway: Climb to the top of the overwhelming Taal Volcano in Talisay, where the bubbling green waters of the Taal Lake await. Within the lake sits yet another volcano, steaming away gently. The trip to the top can be tiring but there are horses available for the less active, and the views from up there are well worth the journey.
  6. Makati City, Metro Manila's financial heart, Philippines Retail Therapy: Indulge yourself in Metro Manila’s financial heart, Makati City, and its Greenbelt mall. You will find a range of treats here—the mall has both open-air and enclosed areas, sit-down as well as fast food eateries, and big international brands (think Calvin Klein, Hermes, and the like) along with high-end and Filipino designer boutiques.
  7. Pristine Islands off the coast at El Nido, Philippines Hop About: Head to the pristine islands off the coast at gorgeous El Nido. There are multiple islands to choose from, each of which is prettier than the other. You can spend your days lazing about on white sands, exploring the area on kayaks and snorkeling among the many colorful fish that call these waters home. If you are lucky you may spot a hawksbill turtle or two, and you may come across dolphins, whale sharks, dugongs, and mantra rays.
  8. Banaue's Rice Terraces, UNESCO-listed World Heritage site Be Bucolic: Get a taste of the Filipino countryside and spend some time amid Banaue’s rice terraces. These rice terraces are a UNESCO-listed World Heritage site, gracefully sculpted into the hillside by the Ifugao people of this quiet little farming community.
  9. Rolling green hills in Batanes, Philippines Get High: You could be forgiven for thinking you are in Scotland when you visit Batanes, the country’s northernmost province. Expect rolling green hills, towering fortresses and the like among the ten islands here.
  10. Slow-roasted Suckling Pig, Philippines Life’s a Feast: You will have a great time going on an eating binge in the Philippines, especially if you love meat. Pork, in particular, plays a big role in the cuisine here, and a slow-roasted suckling pig is the best treat to be had. Even if you are not a big pork-eater, Manila is where you should aim to experiment with your eats and get an introduction to the many flavors that make up Filipino food.

MYANMAR: The Best Sights, Destinations, and Experiences (ASEAN Travel)

Best Sights of Myanmar

Mandalay, Bagan, Inle, and Yangon—these names all conjure up the wonder that is Myanmar, at least in a traveler’s mind. Now, you have the freedom to venture a little farther as well. With recent reforms easing restrictions in this proud country, it is finally time to see what Myanmar has been hiding away all these years.

Myanmar: At a Glance

Experience the Best Attractions of Myanmar

  1. Chauk Htat Gyi Pagoda, Yangon Architecture 101: Former capitals are full of old glory and great architecture, and Yangon is not far behind. Spend the day marveling at the colossal reclining Buddha at Chauk Htat Gyi Pagoda, the gold-hued Botataung Pagoda and Sule Pagoda, the Burmese Yangon City and the colonial-styled Supreme Court.
  2. Bogyoke Aung San Market, Yangon Hunt for Bargains: The Bogyoke Aung San Market (sometimes known by its British name, Scott’s Market) is a sprawling old handicrafts bazaar of around 2,000 shops. Spend the day alongside locals, haggling for colorful Shan shoulder bags, and interesting bits of local arts and crafts, jewelry, ancient antiques, and lacquer ware.
  3. Mohinga, Rice noodles served with fish soup It’s All Rice: Rice, in all its forms, is a staple in the distinctive cuisine of Myanmar. Rice noodles served with fish soup, known locally as mohinga, are a favorite breakfast dish, and are usually eaten on special occasions.
  4. Mandalay Hill, Myanmar Get a Bird’s Eye View: Climb up Mandalay Hill for an all-encompassing view of how flat Mandalay really is. You will see the Irrawaddy twisting across the land from up here, while you help a local monk brush up his English. This hallowed spot is where Buddha once prophesied the founding of a great city.
  5. Inle Lake Boating, Myanmar Row, Row, Row Your Boat: Surrounded by greenery and marshes, cool morning mists, villages of houses on stilts and floating gardens, the Inle Lake is usually pretty. You can get around the lake on a motorized canoe, or ask around if you want to float about on a traditional flat-bottomed Intha skiff.
  6. Myinkaba Age-old lacquer, Myanmar Art Lessons: Bagan, in the Mandalay region, brims with graceful ruins of old temples, pagodas, and stupas. Between Old and New Bagan, the village of Myinkaba boasts an age-old lacquer ware tradition; you can spend hours rummaging through excellently crafted cups, plates, and boxes, wondering just how many you can fit into your luggage.
  7. Bawbawgyi Pagoda, Thayekhittaya Wander through Ruins: Thayekhittaya or the ‘Fabulous City’ a Pyu capital of long ago, was destroyed almost as long ago by Chinese invaders, and today, it has been nominated for a UNESCO World Heritage listing. Rumble through the ruins among the overgrown bush on an ox cart, and explore the Bawbawgyi Pagoda, one of the oldest in the city, and the Leimyethna Pagoda, with Buddhist relief carvings.
  8. Shwedagon Pagoda, Yangon Pagoda Sunsets: Make your way up to the Shwedagon Pagoda in Yangon as the sun begins to set, the golden spires of the temple light up, monks glide past and local residents trickle in to pay their respects as the sky takes on various colors of pink, oranges and blues. Look for a quiet spot, settle down, and enjoy the peace of the evening.
  9. Mount Popa, Myanmar Find Your Spiritual Side: Go forth and find your holy spirit at Mount Popa, an extinct volcano and the abode of 37 nats or local spirits, once so important that the early kings were rumored to consult them on crucial matters. The solitary peak is covered in stupas; the statues at the base are of the spirits.
  10. Irrawaddy River, Myanmar I am with Stupa: Sagaing lies along the Irrawaddy River, across the only bridge that spans it. It is dotted with white and gold pagodas that shimmer away in the sun, and if you clamber up the tree-hung stairways past ancient monasteries that lead up to various viewpoints, the spectacle of stupas is something else.