23 Mayıs 2012 Çarşamba

Does Two Integer arrays Come from one sequence

To contact us Click HERE

Question:There is a list of int arrays; the next int array is the explanation of the previous one.For example, if the first one is [1], the next int array would be [1, 1], it means the previous array has a number one, the next array would be [2, 1], means the previous array has two one, and so on.11 12 11 2 1 11 1 1 2 2 13 1 2 2 1 1
So the question would be: given a two int arrays A and B, you need determine whether they come form one sequence? In other word, whether you can induce from A to B, or from B to A?
Answer:It seems that we can just induce from A, and get its next int array, and its next's next array, if one int array equals B, then we can return true.But this problem is that what if A and B don't come from one sequence, when we stop?We don't know.
In this problem, we can think reversely, if we starts from A, and get A's previous array, if it equals B, we can return true, if not, we continue. But if not, when we stop?
The first case: we can’t conclude previous array from the curry array:Two cases:1.      When the current int array has odd numbers, we stop, as it's impossible to get its previous array. The reason is simple: (a[i], b[i]) describes one item of previous array, if current array has odd numbers, (a0, b0) .. (a[n], b[n]), a[n+1], a[n+1] can't describe one item of previous array.2.      When the current int array has even digits, but have some invalid pairs, such as (0 1). Another case: if we deduce from A, and get it's parent, and its parent's parent, what if we get A again, if we continue, it will loop for ever. So in this case, we should return false, why?
A's parent array A[p'] is unqiue, A[p']'s parent A[p''] is also unique...A[p'']A[p']A <--.....A[p'']A[p']A <--So the whole array sequence would be a loop. if we search from A, and meet A again, and no B during the path. So B would not be in the sequence.
Also remember that if the previous process determines whether B is in front of A in one sequence, we still need determine whether A is in front of B in some sequence.
Code:The complete algorithm/test code and also many other algorithm problems and solutions are available from https://github.com/programmer-plus.
package org.codeexample.sameSequence;import java.util.ArrayList;import java.util.List;import org.codeexample.common.Utils;public class AlgorithmSameSequnce {	/**	 * see	 * http://programer-tips.blogspot.com/2011/08/         * two-integer-arrays-from-same-sequence.html	 * <p>	 * 	 * @param arrayA	 * @param arrayB	 * @return	 */	public static boolean isInSameSequnce(int[] arrayA, int[] arrayB) {		return isInSameSequnce(Utils.toList(arrayA), Utils.toList(arrayB));	}	/**	 * see	 * http://programer-tips.blogspot.com/2011/08/         * two-integer-arrays-from-same-sequence.html	 */	public static boolean isInSameSequnce(List<Integer> listA,			List<Integer> listB) {		List<Integer> listACopy = new ArrayList<Integer>(listA);		if (isInSameSequnceImpl(listA, listACopy, listB))			return true;		List<Integer> listBCopy = new ArrayList<Integer>(listB);		return isInSameSequnceImpl(listB, listBCopy, listA);	}	private static boolean isInSameSequnceImpl(List<Integer> listA,			List<Integer> interim, List<Integer> listB) {		List<Integer> previous = getPrevious(interim);		if (previous.equals(listB))			return true;		// meet listA again		if (previous.equals(listA))			return false;		if (previous.isEmpty())			return false;		return isInSameSequnceImpl(listA, previous, listB);	}	/**	 * Return the previous array, for example, the previous array of [2, 1]	 * would be [1, 1], the previous of [1, 2, 1, 1] would be [2, 1]. <br>	 * If the list is invalid or can't induce its previous array, return one	 * empty list.	 * 	 * @param list	 * @return	 */	private static List<Integer> getPrevious(List<Integer> list) {		ArrayList<Integer> result = new ArrayList<Integer>();		// if the list has odd number, return empty list;		if (list.size() % 2 == 1)			return result;		for (int i = 0; i <= list.size() - 2;) {			int times = list.get(i++);			// no previous row for input [0, 1],			if (times == 0)				return new ArrayList<Integer>();			int digit = list.get(i++);			for (int j = 0; j < times; j++) {				result.add(digit);			}		}		return result;	}}

Is Successive Array?

To contact us Click HERE
Question:
Given an unordered int list, except 0, each number can appear only once, 0 can be regarded as any number. Now we need determine whether the digits from the list are logically successive,
For example, 3, 2, 1 would be considered as successive.0, 3, 1 also is successive, as 0 can be regarded as 2.0, 0, 3, 1 also is successive as 0, 0 can be regarded as (0, 2), or (2, 4).
Answer:First, simplify this question, if there can be only one 0, and can't be considered as any number. How we determine whether the array is successive?
In this case, we can get the maximum and minimum of this array, if (max - min) = (length of the array -1), then this array is considered as successive. This is very straightforward.
So back to the original problem, suppose the length of the array is n, and there is x 0, and thus n-x non-zeros, so we can get the inequality:  if (max - min) <= (n -1), this array is successive.0, 3, 1 ==> (3-1) = len -1 = 20, 0, 3, 1 ==> (3-1) < len - 1 = 3
Code:The complete algorithm/test code and also many other algorithm problems and solutions are available from https://github.com/programmer-plus.
package org.codeexample.successiveArray;public class SuccessiveArray {/*** see http://programer-tips.blogspot.com/* 2011/08/is-array-successive.html* <p>* Determine whether the unordered array is logically successive, 0 can be* regarded as any number. For example, [0, 3, 1] is successive, as 0 can be* regarded as 2.* * @param array* @return*/public static boolean isArraySuccessive(int[] array) {int min = Integer.MAX_VALUE, max = Integer.MIN_VALUE;for (int i = 0; i < array.length; i++) {int temp = array[i];if (temp == 0)continue;if (temp < min) {min = temp;}if (temp > max) {max = temp;}}return (max - min) <= (array.length - 1);}}

Implementation Variants of Singleton Pattern

To contact us Click HERE

Singleton is one of the most common design patterns, but it has many implementation variants: lazy Instantiation, eager Instantiation, static holder idiom, and etc. Static holder idiom is my favorite.
package org.codeexample.javacode.singletons;import java.io.Serializable;public class SinletonVariants {}/** * When the singleton class is referenced, its instance would not be created, * and also Java guarantees that the class initialization is atomic. *  * So using the static holder idiom, we combine the benefit of lazy * instantiation and no further synchronization after the instance is created, * <p> * My favorite, always use this one. */class SingletonHolderIdiom {	private SingletonHolderIdiom() {	}	private static class SingletonHolder {		private static final SingletonHolderIdiom instance =         new SingletonHolderIdiom();	}	public static SingletonHolderIdiom getInstance() {		return SingletonHolder.instance;	}}/** * To maintain the singleton guarantee, you have to declare all instance fields * transient and provide a readResolve method that directly return the static * instance, also you must use eager instantiation. * <p> * see Effective Java 2nd Edition: <br> * Item 3: Enforce the singleton property with a private constructor or an enum * type */class SerializableSingleton implements Serializable {	private static final long serialVersionUID = 1L;	private static SerializableSingleton instance = new SerializableSingleton();	private SerializableSingleton() {	}	public static SerializableSingleton getInstance() {		return instance;	}	// readResolve method to preserve singleton property	private Object readResolve() {		return instance;	}}/** * This variant avoids the drawback of eager instantiation, as no resources are * allocated before the instance is actually accessed, but further * synchronization might seem unnecessary and expensive after the instance is * already constructed. *  */class SingletonLazyInstantiation {	private static SingletonLazyInstantiation instance;	private SingletonLazyInstantiation() {	}	public static synchronized SingletonLazyInstantiation getInstance() {		if (instance == null) {			instance = new SingletonLazyInstantiation();		}		return instance;	}}/** * This would initialize this singleton class eagerly, when the class is loaded * at first time. Thus, it may happen that the singleton instance is constructed * even if it is not accessed. This is a drawback, especially when the * construction is complex and time/resource consuming. The good part of this * variant is its simplicity. *  */class SingletonEagerInstantiation {	private static SingletonEagerInstantiation instance =     new SingletonEagerInstantiation();	private SingletonEagerInstantiation() {	}	public static SingletonEagerInstantiation getInstance() {		return instance;	}}

Learning Java Integer Code and Puzzles

To contact us Click HERE
1. Question - What the program would output?
int i = 127;boolean b = (Integer.valueOf(i) == Integer.valueOf(i));System.err.println(b);i = 128;b = (Integer.valueOf(i) == Integer.valueOf(i));System.err.println(b);
We can immediately know the answer after we look at the source code.
public static Integer valueOf(int i) {    if(i >= -128 && i <= IntegerCache.high)        return IntegerCache.cache[i + 128];    else        return new Integer(i);}
We can know it doesn't cache all Integer values, as this may consume too much memory, so it just caches the numbers between [-128, 127] in the static IntegerCache class, for other int numbers, each time it would return a new Integer. Class Long also only caches the numbers between [-128, 127].The output of the previous program would be obvious now: true and false.2. Autobox and Auto-unbox2. 1 How is it implemented in JDK?Simply put, when we call "Integer wrapper = 2;", the java compile would translate it to "Integer wrapper = Integer.valueOf(wrapper);".When we call "int i = wrapper;", the java compile would translate it to "int i = wrapper.intValue();".You can verify this by using javap to look. at the compiled java class: javap -c IntegerTester.Long.valueOf(0L).equals(0)?2.2 What would be the output of the following program?
Long l = 0L;Integer i = 0;System.out.println(l.equals(i));System.out.println(i.equals(l));
The program above is same as:So let's look at the JDK source code again:
public final class Integer extends Number   implements Comparable<Integer> {    public boolean equals(Object obj) {    if (obj instanceof Integer) {        return value == ((Integer)obj).intValue();    }    return false;    }}public final class Long extends Number   implements Comparable<Long> {    public boolean equals(Object obj) {      if (obj instanceof Long) {          return value == ((Long)obj).longValue();      }      return false;    }}
From the code, we can see if the type of parameter is not same, these method would return false.So the output of previous program would be false, false.Autobox and auto-unbox are good features, as it will convert the primitive type or wrapper type to the needed one, and we can write less code, but we should use it carefully, as usually, it may create object under the hood, if we are unaware of this, it may cause big performance penalty.
public void test(Integer i) {    while (i < 0) {        --i;    }}
In the previous program, in each step, JVM actually does this: it calls i.intValue(), subtracts it by one, and then create a new Integer value.For JVM, it would be same as:while (i.intValue() &lt; 0) {    i = Integer.valueOf(i.intValue() - 1);}So in each step, we would unnecessary create one Integer value and call intValue methods twice.Try to use javap to look at the compiled class file.If we know this, we can change our code like the below, it would be faster.
public void test(Integer i) {      int j = i;      while (j < 0) {           --j;      }      i = j;}
In our code, it's to better use primitive type as often as possible. In Integer class there are many other interesting and useful methods, some methods are listed below, is it cool and a little confusing? Try to figure it out.
public final class Integer extends Number   implements Comparable<Integer> {    public static int reverseBytes(int i) {        return ((i >>> 24)           ) |               ((i >>   8) &   0xFF00) |               ((i <<   8) & 0xFF0000) |               ((i << 24));    }    public static int reverse(int i) {        // HD, Figure 7-1	i = (i & 0x55555555) << 1 | (i >>> 1) & 0x55555555;	i = (i & 0x33333333) << 2 | (i >>> 2) & 0x33333333;	i = (i & 0x0f0f0f0f) << 4 | (i >>> 4) & 0x0f0f0f0f;	i = (i << 24) | ((i & 0xff00) << 8) |	    ((i >>> 8) & 0xff00) | (i >>> 24);	return i;    }    public static int bitCount(int i) {        // HD, Figure 5-2	i = i - ((i >>> 1) & 0x55555555);	i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);	i = (i + (i >>> 4)) & 0x0f0f0f0f;	i = i + (i >>> 8);	i = i + (i >>> 16);	return i & 0x3f;    }}
Reference:The Advantages and Traps of Autoboxing

Rearranging Letters to Form Word

To contact us Click HERE

Question:Rearranging the letters to form a word is a very funny algorithm problem, and it has several variants. Here we will talk about the problem – the most efficient way to find out whether we can rearrange these letters and form a word, and if yes, return all words that can be constructed.For input [d, a, e, p, n, p], we can rearrange them into a word "append".
Answers:We can think about our commonly-used data structure - HashMap, if we can build one HashMap from the dictionary, and then query it using some key, the running time would be O(1). Brilliant!!!
But what would be key and value?  First the input order doesn't matter, "atc" is same as "tac", or "cta", so we can order the input, "atc", "tac", "cta" would all be sorted as "act".Also we may construct several words from the letters, for example, we can form "act", "cat" from the letters - "atc".
So we can build the HashMap from the dictionary, the key would be the sorted letters; the value would be a list containing all words that can be constructed by rearranging the order of these letters.
Code:The complete algorithm/test code and also many other algorithm problems and solutions are available from https://github.com/programmer-plus.
package org.codeexample.algorithm.wordPuzzles;import java.io.*;import java.util.*;import java.util.regex.Pattern;public class Dictionary {    private Map<String, HashSet<String>> wordMap = new HashMap<>();    /**     * @param dictionaryFile, the file contains list of words,      * each line may contain several words that are separated by space.     * @throws IOException     */    public Dictionary(String dictionaryFile) throws IOException {        init(dictionaryFile);    }    private void init(String dictionaryFile) throws IOException {        FileReader fr = new FileReader(new File(dictionaryFile));        FileReader fr = new FileReader(file);        BufferedReader br = new BufferedReader(fr);        Pattern pattern = Pattern.compile("\\s+");        while (true) {            String line = br.readLine();            if (line == null) {                break;            }            String[] words = pattern.split(line);            for (String word : words) {                word = word.trim();                if (!word.isEmpty()) {                    String sortedWord = getMapKey(word);                    HashSet<String> matchedWordSet = wordMap.get(sortedWord);                    if (matchedWordSet == null) {                        matchedWordSet = new HashSet<>();                    }                    matchedWordSet.add(word);                    wordMap.put(sortedWord, matchedWordSet);                }            }        }    }    private String getMapKey(String letters) {        char[] chars = letters.toCharArray();        Arrays.sort(chars);        return String.valueOf(chars);    }    /**     * Return a list of word that can constructed by rearranging these letters.     *      * @param letters     * @return a hash set that containing all words, if can't find one, return     *         empty list, instead of null to avoid NPE in client code.     * @throws IllegalArgumentException if parameter is null.     */    public Set<String> formWords(String letters)             throws IllegalArgumentException {        if (letters == null) {            throw new IllegalArgumentException("parameter can't be null.");        }        Set<String> wordsSet = wordMap.get(getMapKey(letters));        if (wordsSet == null) {            wordsSet = new HashSet<>();        }        return wordsSet;    }}

17 Mayıs 2012 Perşembe

Theme 65 - Irony

To contact us Click HERE
From @swordfish19: Ironies abound. An eraser is manufactured to clean up after a pencil. The eraser owes its life to the pencil. However, from the moment it’s born, slow and certain erosion starts which eventually culminates into non-existence.  That which is the cause of life also results in the taking away of life. Ironies abound. Look around.

From @roshd: Boy meets girl and falls in love. Thoughts of her drive him crazy. He would do anything for her, even marry her. He proposes. She demurs. She’s not sure of his commitment. She has been hurt before. And actually both want the same thing. If it’s meant to be, love will find it’s own way.

From @gauravjagwani: He kept falling prey to that bottle of wine. He had it in him to beat it. However, he never did last more than three weeks sober. His problem wasn’t serious for rehab. But, he was no lightweight either. He stayed a whole month sober. To celebrate his new high, he poured himself a glass.

From @n0rwegianw00d: 
Incessant rains had lashed the city sincemorning. But Rameshwar was a happy man. He had worked hard to ensure that thedrainage system was in top condition. This year, there will be no complaints.With a big smile, he left for office.
His phone rang. “Rameshwar, where are you?”
“Sir, my society is flooded.”
From @IndianIdle: He was geek from his childhood. He fancied superheros and their suits. Always wanted to be like them and shine in the glitz and glamor. He grew up to achieve his dream, and got that nearly too. Now he also built the suit. And Ironed them in his shop. His friends called him 'Irony Man'. 
From @dasCapital_: 
The nuclear bomb destroyed  Loki’s army alright, but he landed on anotherplanet. Paralysed neck down and thinking of a way out, some kids came near himand inspected him. 
“Let’s make him into a toy. Looks ironyenough.”
“Irony!! Bah.”  So thought Iron Man and started waiting forHulk to come and rescue him.
From @teejavus: She could never trust anyone, life has always been unfair. He seemed nice but she could never understand why. She whispered her fears into in his ears. Faced him, "Is it clear ?", she asked . "As clear as mud", he said. She was blind from birth. She tugged at him. He kissed her. She smiled; blissfully. 
From @madhavisud: We all know Life isn't fair, but did we know it is full of irony? I always wanted to work in the Finance Domain. Finally, when the opportunity knocked my glass cabin door, I had long lost interest, due to my own confusions, and accepted it reluctantly. I can deal with unfair!! What about irony??
From @chinmaynaik07: 
She had wanted him to love her. Madly.
Now he does.
However, it is too late.
She is hurt and has retreated to her old world. She only wants to be with her friend in him right now.
But his love has only grown.
And now they can’t be, because he loves her too much.

From @anjana_murali: He had lost it all finally, the splendour, the wealth, the princedom when his elder brother had returned from the dead. The irony was that the girl he had loved but not married because of his greediness and her commoner status had been his brother’s saviour- now the princess as his lawfully wedded wife.
From @bitchwanti: Everyday she laughs when she types "angel" in her email id. Her innocent face once gave her nick name. "Bitchwanti",she keys in on the user name slot of twitter. That's when the irony hits her.
From @Crucifire: 
“WHERE IS MY WHITE SHIRT?”
“IRONING IT, DONT SHOUT!”
Power goes off.

“I WILL SAVE YOU!”, a caped crusader breaks in through the window.
“I am IRONYman”
“IRON MAN? In MY home?”
“No no IRONYman. Lady, my cape got creased while coming in, could you please iron it?”

*WHACK*

From @Realfartshady: 
"Did you see that new deal on tv yesterday?"

"Yep, I did."

"Says we can get internet for 20$ a month!"

"Ain't it sweet."

"So, should we get it?"

"Hell, alright. How?"

"They say 'order online'."

"What’s ‘online’?"

"Fuck if I know!"

From @sarwarbaig: "We armed them and funded their war because we wanted them to thwart our enemy's attempts to gain a foothold in the region. We cheered them on. They grew to hate us for other reasons and hit us unexpectedly and catastrophically. Now we've been bombing them for eleven years to bring them freedom."
From @writingchalk: After years of battling with cancer, she was at peace. Relatives poured in grieving, offering condolences. Her 5-year old daughter was blank. She took the picture of a crab to her father, “Daddy, if this made mommy sick I want to beat it up.” In the midst of this gloom, everyone managed a little smile.
From Ruby: Finally the moment had arrived. He kissed on her forehead while she was taken to labor room.  After all it was a much awaited moment after 10 years for them. Shelley had planned loads of things for her unborn. Even the name was decided. Apparently the doctors could not save her. Irony of fate.
From @madrasmad: He was born to open. Politics and jealousy kept him out of district, state and national cricket teams, but he was one of the best openers that critics knew. He later worked as a bartender for a few years, but kept forgetting to close those bottles. Today, Unlockeshwar Reddy works as a toll-gate operator.
From @_Nehu: Famous social worker, his job was to save girl child. He wanted world with no dowry, no sati, no rape… He worked for women empowerment. Every night he sits beside her daughter(Photo) and proudly tells success story with tears.Irony of his life 10years back his daughter was burnt to death for dowry.
From @HighHeelsWaali: Her son had done nothing wrong. She was so sure of it. There had to be a mistake. Her blood could not be a rapist and a murderer. The girl must be to blame. That shameless tart.
She conveniently forgot that the girl was of her blood too. 

From @akshayabansal: His dearest friend had a deep scar on his face. Fate, their families separated during the air raids. Often, he wondered about his friend. Now, 30 years later, a man stood before him. Same scar, different name. His unmistakable smile was the giveaway. How ironic! For I was to send him away again.. 'Life imprisonment!' 
From @mydirtylinen: I could stare into your eyes forever, but the heat between your legs beckons. I could lazily run my tongue down your thigh but I must taste you now. I could whisper sweet nothings in your ear, but I love having you moan for me. I could do this all night, but I ache for you.
From @miffalicious: They called him the brave warrior, the fearless leader of a ruthless tribe. Strapping lad with his broad shoulders, huge, rippling muscles and furrowed eyebrows. Yet, he had a strange habit of avoiding the sunshine, to the curiosity of his tribespeople. What they didn't know was, he was afraid of his own shadow, you see. 
From @hilonee: Each year she worked harder than the previous believing she would make it. But her belief proved wrong for 3 consecutive years. She decided it was now or never. She rehearsed day in and day out. Non-stop. Her hard work earned her the coveted seat. The mental and physical stress earned her dysphonia. Ah! The irony!
From @vishalshriyan: His brow was furrowed with the absolute concentration only a child could have. He ran his finger along the doctor's report which finally identified that thing he suffered from. He had thought what ailed a seven year old would have a simple name. Ironically it was the hardest word he had ever read. Dyslexia.
From @ghaatidancer: They'd vowed never to make promises. They'd discussed polygamy. They'd gone on 'breaks' to 'figure things out'. They'd both had dirty little secrets. They'd sworn never to speak of commitment. They lived together, separate, yet as one. They were the only ones who really lasted.
From @rumna: We yearned for the land of milk and honey. We wanted it all, generous salaries, a Mercedes parked in front of the town house, a summer home in Maine, wild parties with exotic food, rich wines. We have it all now, yet pine for love, warmth, family, friends who matter, a wish to belong again.
From @aaroo4: “ADULTERY”-  Yippee.. Oh wait,  i get only  9 measely points. Cmon, pick up the missing tiles already, i am going to play my turn.. watch out. “MARRIAGE” – Gosh, i wonder how many points that is… 1..3..6.. 9..10, dang only 10 points. Oooh, my turn already? Nice… Here it comes…
“IRONY”  ha-ha.. How about that!. Ouch!

From @randomWhiz: 
'We guard you for your safety.'
'There is a big bad world out there.'
'The people out there want to do bad things to you.'

Just when she was pondering about all the above, her uncle slipped in and locked the door from within. Her prison of safety doesn't guard against the inmates, apparently.

From @melittlepixie: After a heated argument, Adrian was slapped by his step-father. On an impulse, Adrian spat on him, kicked him in the groin and walked away. When he returned home, his mother was hysterical. ‘Adrian! How could you spit on him, you son-of-a-bitch?’, she screamed. Adrian smiled. His mother never saw the irony of calling him that. 
From @dhavalmehtas: Although he had had great opportunity in b'lore choose Bombay...he pays visit to her home,almost every weekends ...he had something to tell her..but failed everytime. "Thank-you" she said... "For what??" he asked "Your support..and you suppose to be Congratulate me first" she said. he didn't understand.."I am engaged....." she said.
From @sausagetangdi: Sleep with them to control your sexual desires, bathe with them to attain Bhramacharya. Don't talk to them to refrain emotional attatchement and you shall reach a stage of self actualization,the most important in psychology. He told his followers, fellow human beings bound to cheat. Ironically, the father of a developed nation,to be. 
From @Oxymoronic_Me: Satisfied, the man looked around him. The house looked beautiful now. He remembered how decrepit it had been a month back. He had scraped it, filled the cracks, smoothened it and colored it brown. He turned to the owner and returned the house keys. It was time to go home. Back to his thatched hut. 
From @Sychlops: 
It was epic.
Just the prospect of it.
A superhero who didn't like being called superhero.
A super-villain who used to be a super hero.
Marvel vs DC.
Iron Man vs Magneto.
They'd stick together for ever.
Cancelling each other out.
They had Superpowers.
But the Laws of Magnetism still applied.
Ironical.

From @philusophur:
The irony was the same fullmoon and the same enraged feeling called love. Only this time, backed-up with fanaticism.

' I love you, the same way, I always have...Deep, Pure and Mad. and if you can't be mine, I won't let you be anyone else's. '

The butcher had his advantage.

' Maybe next-time. '

From @anushreekejriwa: He was a successful man in terms of work and money. The world was at his feet. He married the girl whom he dearly loved and was blessed with a beautiful daughter. He didn't have time for the angel, when he retired he was in a quandary; ironically then his daughter didn't have time.
From @kunalbaidmehta: Growing up in a middle class family with limited means had made Michal stingy. This nature of his caused a lot of stress in his marriage to a girl who liked to live the good life. Michal has changed now and he indulges and pampers himself often. Ironically, this change happened after May left him.
From @vivekisms: It was supposed to last. The forevers had to be achieved. It was promised after all. So they should have stuck to it? Love is forever. Love is eternal. Love is meant to be. They outgrew love.










Theme 66 - Taste

To contact us Click HERE
From @zaiuranjit: He smiled in his sleep, a wonderful scent tickling his brain slowly awake. He thought it was strange that drops were falling onto his lips while he lay in bed, until he licked his lips. His smile grew wider, but he kept his eyes closed. She knew this vampire loved the taste of her blood.

From @gauravjagwani: T'was his first night at the orphanage. Seeing his face buried in a pillow while others played outside bothered her. She sat besides him, described the beautiful night sky. The boy started crying. 'Please wake me up when the sun is out. I get a taste of night all the time as I am blind.'


From @grouchyindian: She was never satisfied with the Six inches,  always craving for the Eight-Nine inches. Size mattered to her more than the TASTE, but then again, She was BIG so was her Appetite.  Being her man I had to fullfil it. Me : Hello Dominoz !!!  #PIZZA .

From @ShoesNSnooze: She got up with a searing pain in her head, and a bad taste in her mouth. Worried, she rewinded on the events the night before. She was at her friend's place with lots of unknown faces, bottles of Old Monk and thumping music. Suddenly she found the source of the taste: She had cooked.

From @Oxymoronic_Me: Meena stood looking at her field. She loved the aroma of wet soil and the feel of fresh air on her face. It was harvest time. Taking a deep breath she bent low to cut the sugarcane. Instead, she picked a handful of soil and gulped it down. The fertilizers killed her the next day.

From @ladyclonidine: With their sky-high heels they walked into the high end store, bitch mode on.Babe 1 rolled her eyes at everything, “Animal print again! So last season”, Babe 2 obediently nodded in agreement. They poked fun at people in the trial-room, “You saw that chick? That print!! My eyes!!!” 
They left empty handed, like always.

From @realfartshady: 

I had a dinner date at her place.

I was hungry and she told me to go ahead with anything in the fridge for the meanwhile.

What I found in her fridge was astounding.

It was packed with yogurt, cheese spread and cartons of milk!

"Archie, the hell is this?" I howled.

"MOOOOOOO..." She said.

From @Itemboi: Just after the new year's midnight kiss, she asks,"I know we have a great chemistry, we look cute together, we dance well, we both like each other... but tell me the biggest reason why we should get together?" He smiles, holds her by her waist and says, "Baby, we have same taste in music."

From @swordfish19: The King lay unconscious. His ministers stood around him. The physician was checking his pulse. His food was spread out on the table. He had taken just one spoonful of the curry and had fallen to the floor. The official food-taster stood, frightened, but secretly relieved. He was late that day, and the King ravenous.

From @dasCapital_: " I was drawn to the bright red apples at the grocery. The shopkeeper claimed that they were imported from New Zealand. Each had a sticker on them to vouch for their quality. I casually took one of them and looked closely and the sticker shouted at me, "OK. TASTED."

From @madrasmad: He wanted to TASTE death. He tried hard. He took to ALCOHOL to see if it would do the MAGIC, and people started GOSSIPING about him. Out of frustration and BOREDOM, he slashed his neck with a SILVER knife, and GRAVITY brought him down. The IRONY is, he was SEDUCED by his BLOODY quest.

From @tunnvi: Her tongue couldn’t quite place the taste. Summer coral sweet. The quick kiss of her lover perhaps, but no. A shy dryness and the scent of honeysuckle, a faraway memory spinning is what she felt. He grabbed her by the hand and ran into the summer twilight. Feeling the sand between their toes, they kissed.

From @chinmaynaik07: He felt sad. It felt like falling down an abyss of despair. He hadn't slept or eaten anything for days. The appetite seemed lost, for food, for sleep, for life. Yet an overwhelming desire took him over, to go back to the alternate reality that was his home, only through the taste of her kiss.

From @teejavus: Slurrp. First sip. Aftertaste was heavenly. I didn't expect this. I knew I was hooked. I always liked trying new tea. This tea was surely a world apart. It had a funny name, maybe too funny. It is confused about its root; green or black. I got addicted at first sip to this Oolong tea.

From @AnOddYellow: The thought of her on his lips drove him mad. The aroma was intoxicating. He gingerly placed both his hands on her waist to steady himself. The heat emanating was warning enough. The concoction was brilliant and he couldn’t resist the beautiful cup of Swiss hot chocolate, he sipped it and nearly burnt his tongue.

From @SarwarBaig: Each night he prowled the lonely highways , looking for his next prey , much like a serpent tasting the air with its darting forked tongue. He'd gladly offer rides to hitchhikers. By the time the newspapers came to call him The Highway Butcher , he'd already strangled and mutilated thirteen people. They never caught him.

From @wekneweachother: German woman. Indian girl. They met at a railway station in Varanasi. She’d come to visit the Ghaats. Girl had just bought two hot jalebi’s from a food vendor. Seeing the woman’s pale face, the girl offered her a jalebi. “How does it taste?” She smiled, “Like hope.” Some encounters give you hope, you know.

From @miffalicious: We heard her humming quietly to herself as she methodically assembled her ingredients.

This was her daily ritual, and no one was allowed to disturb her. It was like she was remembering our grandfather, who’d taught her the recipes.

And yet never once did she sample her feasts. It was her offering for his love.

From @kunalbaidmehta: It seemed like a case of murder for robbery, but the autopsy report revealed poison in his blood. The police found no evidence of poison in the house. They didn't check the wall plaster that was coming off. His brother knew he loved the taste of chalk from childhood and hadn't given up as yet.

From @GleeBee_: A gusty wind blew. She watched the waves, rising higher and higher as they crashed against the bedrock. A thunderous sound cut through the dense air. It rained. The smell of damp earth rendered her tingly. She could almost taste the liquid sunshine. Overwhelmed with emotion, she felt aware of her being. She felt alive.

From @anjana_murali: 

“How is it?” she asks her husband excitedly.
“It is delicious” he replies.
She goes to answer a call. He empties the dish in the waste basket.
She comes back and exclaims, "You finished it so fast??"
"Yes, I couldn't resist".
"Wait, you should have more then."
“Sure”, he says thinking God save me!!

From @AmanjotKSandhu:She decided she won’t go down without a fight. He attempted to force her to submit quietly. She landed a heavy punch on his face. Taken by surprise, he slapped her hard. She kicked him in the groin. He fell. As she ran away, she tasted blood in her mouth. The taste of victory!

From @crazyandhow: Tempting; slurped staring at the forbidden fruit. *maybe its yum*

Watery; his tongue dripped saliva and curiousity knew no bounds. *The coast is clear*; his sly eye had moved around the room.

Leaning forward; he happily grabbed and swallowed. Smile. 2 yr old Aaquib felt weird and panicked at tasting his shiny coin.

From @whimsytales: He never really liked her taste in music. But he was glad that she had one. He'd listened to her songs to know her a little better -the lyrics that touched her, the melodies that she hummed, hoping that maybe some day, he'll figure her out. She was happy knowing that he tried.

From @shekhartripathi: I ran towards the exit of the Lucknow Airport; boarded a cab and reached home within minutes. It was 3PM and I wasn’t too hungry but my olfactory senses could smell awesome food cooked by Grandma. A small piece of roti dipped in paneer. It felt like Heaven!! Surely Grandma knows sorcery!!!

From @violinraindrops: Mariam hated being a part of the elite. Married to an affluent businessman for money and not love, her story was common in the society. But today was going to be the end. Walking towards the exit—“I’ll be back” she said. With one last glance at her old life, she was already savouring freedom.

From @_Nehu: Against his parents wish Rajiv left home to find his own career. They wanted him to become a doctor or engineer like normal kids do. Today they are proud of him, he is worlds number one... His job was to seduce the taste bud of the people. Yes He is a chef. He tasted Success.

From @dhavalmehtas: "she started new life..which she always wanted to live-in but couldn't make it.jogging,gym,swimming,yoga,playing guitar and ofcourse writing blogs,reading novels which was her Passion before getting into his life,life has no more complications now.in short she enjoyed her brief taste of INDEPENDENCE after getting dumped by him."

From @bitchwanti: She sat there, pretty against the window of the grimy bus. At the streets she stared, a trance of human movements. Tongue slowly circled the lips, as though tasting the city.The saline of a tear on her mouth brought her to the present. She had lost so much to this city, she realised, as the bus left it behind.

From @cruminous: I watch as it arrives. The sight of it, piping hot, burning a hole through years of quiet preserve. That specific aroma weaving its way into my memory, daring it. I lift my fork and remember dinners, conversations, you.  As I finally eat, I find that the dish is now cold. And the taste, bitter.

From @vivekisms: The vodkared-bull kiss. The history of kisses, you said, in a jocular manner, leaving mebreathless. And we danced. Do you remember? And you kissed me again. On thedance floor. This time whiskey on the rocks. We made out in the car. Hungrily. Thistime it was Altoids. You were cautious. I wasn’t. 
From @roshd: Raj was worried. His son Rishi was 22, brilliant but showed no interest in girls. A chip off the old block except for this. So when he saw him with Vijaya, lost in her smouldering eyes and so obviously in love, he smiled. The cub had tasted blood, he would be alright. 
From @tweettabulous: Steve was known for his handsome looks. His deep set black eyes always spoke of an untold mystery. Every woman lusted for him. That compelling smile made them, his slaves and ready to die for him. He loathed his captivating self ... But the taste of blood had driven him into cannibalism.
From @swaravali: She followed the recipe accurately, yet it just wasn’t the same.  Is that possible?  She had taken down every detail, watched it being made not once, twice but several times!!!  And yet something tasted different.  Then it dawned, there is one ingredient that would always be missing, the love her mom garnished it with.
From @randomWhiz: Weight loss was important, right, healthy. Exercise was fun, and made me strong. But my love for baking stems from my love for chocolate laden goodies, that brocolli can't quite match. So, as I sit here devouring the donut, I know there are more laps to run tomorrow. But, I know it'll be worth it. 
From @HighHeelsWaali: There was no difference between the two. The parts were the same - rump, rib, breast, thigh, shank. And the colour was similar, a pretty light pink. He didn’t think it was a crime, and he had his ways around it. He asked her to come home for a wine tasting, and sharpened the knives.
From @drun007: He had forgotten the taste of whiskey. He quit 16 years back to save his marriage.  It was well worth it. Gaurav reminisced the good times. Anita by his side, kids well settled, adorable grand kids, memories galore. First peg after so long. His throat burned. The taste was different. Life was sweet, sugar sweet.
From @rumna: He silently noted the deep color. Swirled the rich wine around in the glass, sniffed in the heady bouquet, tilted the glass took a sip, savored the wine before slowly swallowing it. Finally he smiled.
Everyone sighed in relief; another vintage wine was ready for the market, to be sold at $42,000 per bottle. 

From @writingchalk: They turned their backs to each other and walked away. It was one step at a time, very deliberate. The tea cups were delicately balanced. Suddenly, they turned around, faced each other and took a sip from their respective cups. The husband’s face contorted violently. The wife smiled, “Kyun ji, chai mein shakkar kam thi?”
From @anushreekejriwa: He's  a loving father blessed with lovely daughters. Life had been unfair to him professionally; they suffered as a result. The little angel loved mangoes but he couldn't afford them. She would quietly see others relishing. Times changed, she gets mangoes but when she offers dad, he says "I have lost taste for mangoes".
From @tanyachopra08: Naina was all set. She was smiling all day thinking about the beautiful evening that was going to follow. She was painting her nails. Glamour Pink,his favourite colour. Her cell beeped. Sorry can't make it, it read. She continued to apply the nail colour for it wasn't the first time she had tasted loneliness.

From @vishalshriyan: Yesterday he'd eaten whatever his mother fed him. Never again. The odd two legged animal who had chased him lay nearby. He had only lashed out instinctively. Now something drew him to tear open the animal's body. He tasted the red fluid that flowed out. And felt a visceral pleasure rising within. He wanted more.