The television show Who Wants to Be a Millionaire? features contestants who can win up to a million dollars -- in a matter of hours -- by answering a series of trivia questions. Earning a million dollars by investing in stocks isn't usually as quick as that, but it is possible. To do so, you need lots of patience and the ability to pick quality stocks. The former is necessary to implement a buy-and-hold strategy successfully. And choosing the right stocks is obviously a prerequisite: Shares of poor companies will deliver below-average returns (at best) in the long run. Let's take a look at two companies that have what it takes to shatter the broader market for many years to come: Tandem Diabetes Care (NASDAQ: TNDM) and Pinterest (NYSE: PINS). Here's why both of these stocks could be millionaire-makers, or at least could vastly outperform the market in the long run. TNDM data by YCharts 1. Tandem Diabetes Care The percentage of the U.S. population with diabetes has been increasing in the past few decades. In 1958, this group made up just 0.93% of the country, but by 2018, that number had risen to 10%. If this trend continues, an estimated 33% of the population could have diabetes by 2050. There are scores of companies that help patients with this chronic health condition manage their illness. Tandem Diabetes does so by providing insulin pumps, an important tool in a diabetic patient's arsenal. The company's t:slim X2 insulin pump -- sales of which generate the bulk of its revenue -- can be used as a standalone device or in combination with DexCom's G6 continuous glucose monitoring (CGM) system. This helps patients monitor and automatically adjust insulin levels for an easier and more efficient way to manage their diabetes. For evidence of the t:slim X2 pump's popularity, consider that Tandem Diabetes ran a customer survey last year during which its crown jewel had a satisfaction score of more than 90%. That said, consumers best express their approval for a product by spending their money on it -- and on that front, the results are also impressive. During the fourth quarter ending Dec. 31, the company recorded sales of $168.1 million, representing a 55% year-over-year increase. Tandem Diabetes Care shipped 32,685 pumps during the quarter, 67% higher than the year-ago period. For the full fiscal year 2020, Tandem's sales jumped by 38% year over year to $498.8 million. Image source: Getty Images. Tandem is well-positioned to keep growing. Management estimates that only 35% of its addressable U.S. market (type 1 diabetes patients) use pumps, whereas the rest still rely on pesky and painful multiple daily injections (MDIs). There is an even bigger opportunity abroad; the company estimates that in its core international markets, just 400,000 of the 4 million type 1 diabetes patients eligible for pumps have made the switch. According to CEO John Sheridan, "Since launching outside the United States just two years ago, we now have crossed approximately 45,000 people using the Tandem pump in nearly 20 different countries. By comparison, it took us more than four years to reach this level of installed base domestically." Tandem Diabetes plans on having 500,000 worldwide customers in its installed base by 2024. For context, the company said it had over 200,000 customers in its ecosystem at the end of 2020. And management has several ways to broaden its customer base in the long run. Last year, the company announced a partnership with Abbott Laboratories -- a notable entity in the diabetes care devices segment. The two businesses are looking to develop solutions to integrate Tandem's insulin delivery systems with Abbott's CGM technology. This project, if successful, would expand Tandem's pool of potential clients. With solid long-term growth opportunities at its disposal, this healthcare company looks like a potential millionaire-maker stock, and certainly one that investors shouldn't ignore. 2. Pinterest Facebook and Twitter may be the most famous names in social media, but that doesn't mean there's not room for Pinterest. This company isn't just a pale copy of competing platforms, either; Pinterest has a more visual flavor than its peers. The company helps users discover and generate ideas thanks to "pins," which are Pinterest's version of bookmarks. This business model is clearly working wonders for the company -- it's hard to find an important metric in the financials that hasn't improved in recent years. During the fourth quarter of its fiscal 2020, which ended Dec. 31, the company's revenue jumped by about 76% year over year to $705.6 million. Pinterest had 459 million monthly active users at the end of the year, representing an increase of 37% compared to the previous fiscal year. The company's average revenue per user for Q4 grew 29% year over year to $1.57. Pinterest's net income for the quarter was $207.8 million, a big leap up from the net loss of $35.7 million it recorded during the fourth quarter of the previous fiscal year. There are good reasons to think Pinterest has a lot of growth left in its engine. The company's strategy can be nicely summed up in the following quote from CEO Ben Silbermann: People need a place to dream and be optimistic, away from politics and bad news, they need a space to focus on themselves based on what they want to do, not what other people will like. And businesses want to reach people early in the planning process before they decide what to buy for their lives. Image source: Getty Images. By providing "a place to dream," Pinterest is betting that it can attract more users to its platform, then keep them coming back for more by continually improving its website. For instance, the company has bettered its search functionality, beefed up its recommendations, introduced more content on its platform, etc. And on the other side, Pinterest is making it easier for companies to advertise on its platform, as well. In October, management announced a suite of tools including a way for merchants to update their catalogs more easily on the website, a storefront profile for merchants that helps facilitate discovery, and new analytical tools to better gauge customer conversion metrics. According to research firm Mordor Intelligence, the digital advertising space is projected to reach $982.8 billion in 2025, up from $304 billion in 2019, expanding at a compound annual growth rate (CAGR) of 21.6% in this period. And it won't stop there. In an increasingly digital world, online ads represent a juicy long-term trend. There are many players in this segment, but Pinterest has carved out a niche for itself. In short, Pinterest certainly has what it takes to shatter the market in the long run. 10 stocks we like better than Tandem Diabetes CareWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and Tandem Diabetes Care wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of February 24, 2021 Randi Zuckerberg, a former director of market development and spokeswoman for Facebook and sister to its CEO, Mark Zuckerberg, is a member of The Motley Fool's board of directors. Prosper Junior Bakiny owns shares of Facebook. The Motley Fool owns shares of and recommends DexCom, Facebook, Pinterest, and Twitter. The Motley Fool has a disclosure policy.Source