Implement a function to check if a singly-linked list is a palindrome?

Though its an old post, I am posting a simple recursive solution that I wrote today while solving the same problem on Coding Interview preparation made easy:

int _isPalindrome(plist head, plist *res)
{
     int temp1 = 0;
    int temp2 = 0;

    if (head == NULL) return 1;

   
    if (head->next == NULL) {
           temp1 = ((*res)->val == head->val);
           *res = (*res)->next;
           return temp1;
    }

    temp1 = isPalindrome(head->next, res);
    temp2 = ((*res)->val == head->val);
    *res = (*res)->next;

     return temp1 && temp2;
}

int isPalindrome(plist head) {
     plist *temp;
     temp = &head;
     return _isPalindrome(head, temp);
}

Why has Simple had a tough time getting traction?

I agree that the service is still in it's infancy and I think that it is worth pointing out the beauty of this fact.  Rather than jamming a bunch of features into a release, they seem to be staggering their features well enough to launch features that actually work.

I see companies launching with as many features as possible in their app all the time. Simple seems to be following a process more akin to the Lean Methodology ( The Lean Startup | Methodology ) where the minimum viable product is launched and then iterated upon.

Their software definitely seems much less buggy than most (IMO).

Who is the best faculty at CSED, NIT Calicut?

I know many have pointed out these names already, I have spent hours discussing with/about these faculty from the beginning of my first year. As I see it, I call the following faculty the three gems of our department:

  1. Vineeth Paleri
  2. Muralikrishnan K
  3. Vinod P

Let me tell about each a little.

Dr Vineeth Paleri: As Ayush Jaiswal pointed out, there is a consensus about Paleri sir being the best. I have no different view. I have spent probably hundreds of hours (and e-mails) discussing with Vineeth sir when I developed the official website of the Department of Computer Science and Engineering earlier and currently while doing my BTech Project (btp-gvn) under his guidance. The vision, the ideals, the clarity of thought, the professionalism, the attention to the minutest details, the perfection will leave you inspired and motivated for life. I have learnt so much from him both during these discussions and during the two courses (CSU312 Principles of Programming Languages and CS6102 Compiler Design) with him that I believe my journey through my BTech life at NIT Calicut will have a lasting effect over my life ahead.

Dr Muralikrishnan K: This is one faculty I have never been able to impress much with my grades (never got anything other than a B from him). But total respect lingers in me for him, for I have been in touch with him from my first year – as the Faculty-in-charge of FOSSCell and FOSSMeet 2010 and 2011; as the Faculty-in-charge of Software Systems Laboratory during my first three years (what it means to me); for being one faculty who really never cared about attendance (any prudent student wouldn't miss his classes); for being the most passionate teacher I have ever seen; as the course faculty for Computational Complexity (http://athena.nitc.ac.in/~kmural…)  (and now for Combinatorial Algorithms); for being a faculty whose classes I really missed when for the first time I didn't take his course (I tried to audit it, but couldn't keep up with the hectic schedule). What is different about his classes – he gives you a completely different view of CS from a theory perspective, once you do a full course with him, you will be at a different level of understanding of any theoretical concept in CS. I can say this because Complexity was perhaps the most difficult course I did in college, and the most revealing when I look back.

Dr Vinod Pathari: Perhaps I am not best suited for writing about Vinod sir, as I did just one course under him – Computer Security. Most of my understanding of him is from seniors or him as the current Faculty-in-Charge of Software Systems Laboratory (I am one of the student admins). But I can say this – he is the most practical faculty I know in our dept. He tends to research his course well in the beginning and keeps on incrementally improving them over the years through feedback from students. As Arunanand TA points out his delivery in class is unparalleled. The best part of Security course were the projects that the whole class was made to do, and how they turned out so well in the end.

One thing that is common about all three and that came as the biggest surprise to me in the beginning is the trust they show in the students – in our capability and integrity. I can point out specific instances if somebody wants to know (please leave comments), but owing to length of this answer I leave them out.

What is it like to be on ‘Shark Tank’?

There’s a few articles on what happens behind the scenes of Shark Tank. I’ll have them linked below.

According to BusinessInsider, a large portion of this is the financials. The producers go to great lengths to make sure that the investors do not know anything about the entrepreneurs or their products before the contestants enter the room.

Some aspects that come to mind: grilling someone on the industry size, the market opportunity, the size of the niche market they want to target (if they are targeting a niche market), competitors, financial data on their competitors, how they got that data / how they arrive at the assumptions about their competitors, and that’s only the introduction side of things that I can think of off the top of my head.

There’s also expansion and using the Shark’s investment. What sort of growth projections do they have, what does the company look like in 3 year or 5 years in terms of revenue vs cost, what alternatives did the entrepreneur consider when deciding on how to spend the Shark’s money, do they expect to have additional rounds of funding, just a deep dive into the finances for the startup. Oh, and of course – what are the current finances for the startup (revenue and expenses).

On top of this, Sharks also want to get to know the entrepreneurs. There’s a few episodes where the Sharks have walked away from a pitch not because the product was bad, but because they didn’t want to work with the investor. On the flip side, there were also times when Sharks made offers not because they loved the product but because they believed in the entrepreneurs. We get a glimpse into some of the characteristics of these entrepreneurs but I’m sure they go more in depth.

And of course, the negotiations! I don’t believe that the offers and counteroffers are made as quickly as shown on TV. There’s a lot more that goes on for the negotiations, and when large chunks of money and equity are on the line, it takes time to come up with these offers, especially for the Sharks because they know nothing about the entrepreneur nor their products before the pitch.

That’s a pretty generic overview of the process from my startup pitching experience. Let me know if I can clarify anything!

Interesting fact: there is a psychiatrist on set that meets with every entrepreneur to ensure that they are feeling well. I love this and I think that mental and emotional support for entrepreneurs is dearly needed.

Sources and further reading:
14 behind-the-scenes secrets you didn't know about 'Shark Tank'
Mark Cuban Reveals What Happens Behind The Scenes Of 'Shark Tank'
5 behind-the-scenes secrets of 'Shark Tank'
10 Secrets You'd Never Guess About 'Shark Tank'
Diving Into Shark Tank: Uncovering 6 Secrets About the Show

Online Journalism: How do you find good articles on Twitter?

I don't think it's that difficult to find good, reliable content on Twitter.

1. Follow people/companies/news sources you rely on
2. Lists are awesome too
3. Learn how to make good use of the search box in Twitter. There are some symbols (+, "", – etc.) that can help you narrow down your search.
4. If making your own Twitter lists takes time, follow lists made by thought leaders in your field.

Hope these help.