Every company eventually encounters issues, and when it does, some investors will jump ship and argue that the stock is destined to underperform for a while. Unfortunately, some corporations do suffer that fate -- but others manage to turn things around. Those companies that can navigate challenging conditions and come out stronger are worth considering for long-term investors.

Let's discuss two examples: Netflix (NFLX -0.93%) and Pinterest (PINS 0.27%). These tech leaders have had their share of detractors in recent years, but are largely proving the bears wrong. Read on to find out more.

1. Netflix

Netflix is one of the undisputed leaders in streaming. But while the company has generated superior returns over the long run, the landscape has shifted considerably since Netflix first opened shop. Competition has intensified, with several major corporations dipping their toes in the waters.

Further, Netflix has faced slow or non-existent subscriber growth at various points, as well as the challenge of password sharing, which took a bite out of its revenue.

As Netflix faced these issues, many investors and analysts lost faith in the company's ability to still deliver outsized returns. However, the streaming specialist bounced back over the past few quarters. Its subscriber count is moving in the right direction again, top-line growth has increased, and free cash flow is growing nicely, among other positive developments.

NFLX Revenue (Quarterly) Chart

NFLX Revenue (Quarterly) data by YCharts

Netflix turned things around by making key changes. It introduced a low-priced ad-supported subscription option, and cracked down on password sharing by making primary account holders pay extra for sub-accounts shared with people outside their households. Can Netflix keep going? It's worth emphasizing that although the company has made changes, its underlying strategy remains unchanged.

Netflix has revolutionized entertainment television by offering convenient streaming across multiple devices, including handheld ones, and an extensive library of content that can be binged anytime. This factor also helped it deal with the competition, since the content it offers is largely unique and includes quite a few original creations. There is still a large untapped market here, since streaming doesn't come close to 50% of total television viewing time, even in its most advanced markets like the U.S.

In March, streaming accounted for 38.5% of television time, with Netflix grabbing 8.1% of that total. So the global opportunity is massive. Netflix has at least two competitive advantages. First, its brand name has become intricately tied to streaming. Second, it collects vast data that helps guide its content creation strategy. The more people watch, the more it knows which shows people want to watch. And the more it creates such shows, the more people watch -- the network effect.

What's next for Netflix? It might not be smooth sailing from here on out -- there will be more headwinds. But the tech company still looks like an excellent stock for investors.

2. Pinterest

Pinterest faced similar issues as Netflix: Slowing top-line growth, declining monthly active users (MAUs), and stronger competition in the online advertising market. The stock was in free fall for some time, but it has now bounced back, along with its financial results and user growth.

In the first quarter, Pinterest's revenue jumped by 23% year over year to $740 million. MAUs reached 518 million, 12% higher than the year-ago period. Importantly, the company's average revenue per user (ARPU) jumped by 10% year over year to $1.46.

Pinterest is benefiting from a bounce back in the advertising industry. Beyond that, the social media giant also implemented various strategies that are paying off. One of them is an artificial intelligence (AI)-powered recommendation system that helps drive engagement on the platform. This (and other) AI-backed initiatives are likely to continue having a positive impact on Pinterest.

The company's CEO, Bill Ready, highlighted the network effect happening here:

As we train our models on more user signals, we're driving even further relevance in our content recommendations to further improve the user signals our AI can act upon.

Further, Pinterest continues to make its platform and its Pins (saved images) shoppable. One of the company's long-term goals is to turn Pinterest into an e-commerce hub where users can search for, save, and, ultimately, purchase the items they want. The company made progress on this front in the first quarter, something that also positively impacted its financial results.

Pinterest isn't that close to making every Pin on its platform shoppable, but the company will also benefit as its MAUs continue to grow and advertising dollars keep coming its way. The stock's long-term prospects look attractive.