☕ Digital Yuan?
China tests out their new digital currency. Technology stocks are dominating the market. Plus, a behavioral interview question.
Hey,
Hope you’re having an awesome day!
Here’s your Industry News and Interview Problem for the day!
Interview Problem
Thought we’d switch it up a bit today and try a behavioral question!
Tell me about a time you solved a tough technical issue or challenge? How did you approach it? Did you learn anything interesting? How does that experience affect how you’ll approach different technical questions in the future?
Bonus - if you really want to practice this question, type your answer up as a reply to this email and send it to me!
I’ll reply back with some feedback!
Industry News
China tests Digital Yuan
Tens of thousands of Chinese consumers spent a digital version of the yuan at Walmart, Gas Stations and Convenience stores across Shenzhen this week. This was part of the Chinese government’s test of the Digital Currency Electronic Payment (DCEP), a digital currency that could replace the Yuan.
The government in Shenzhen handed out 10 million yuan’s worth of DCEP (about $1.5 million dollars) to 50,000 randomly selected citizens through a lottery on the currency’s wallet app. Each winner got 200 digital yuan to spend at more than 3000 retail outlets across Shenzhen.
The experiment was extremely successful with many users saying they intend on using the DCEP over WeChat or Alipay (apps that Chinese consumers currently use for mobile payments).
Users will have to register a dedicated account for DCEP transactions using their cell phone number. They have to download a wallet app that is linked to one of China’s Big Four state-owned banks. Then, they can scan each other’s QR codes in the app to do transactions.
The success of this experiment shows that China is ready for the full launch of their digital currency very soon. A digital yuan would give the Chinese Central Bank much more control of their monetary policy. China has already been moving towards a cashless society with WeChat and Alipay, but this will accelerate it even further. It also puts China ahead of every other nation in terms of developing a digital currency. This could bolster China’s ambitions of pushing back against the US Dollar as the dominant global reserve currency.
Tech dominates US Stock Market
Tech companies now account for nearly 40% of the S&P 500, now beating the previous record of 37% in 1999.
Apple, which became the first U.S. company to hit a $2 trillion dollar market cap earlier this year, accounts for 7% of the S&P 500 alone.
However, very few analysts see Big Tech stocks as over-priced, especially when compared to the valuations in the late 90s. Earnings have grown tremendously and these companies show no sign of slowing down.
Trends in 2020 like Cloud Computing, Remote Work and Online Shopping have only accelerated the reach and growth of technology companies. Meanwhile, many of the traditional, brick and mortar businesses are struggling. Companies that were struggling pre-COVID are now in danger of going bankrupt.
The main thing that makes tech-bulls nervous now, is the prospect of government regulation. There’s been increasing regulatory scrutiny from the US Government over Amazon, Facebook, Apple and Google over the past months and it only shows signs of speeding up.
Previous Solution
As a refresher, here’s the previous question
Write a function that checks whether an integer is a palindrome.
For example, 191
is a palindrome, as well as 111
. 123
is not a palindrome.
Do not convert the integer into a string!
Solution
We can solve this by implementing the following algorithm
Compare the first and last digits of the number
If they’re equal -> strip the first and last digits and go back to step 1.
If they’re unequal -> return False
If the number is 0, return True
How do we get the last digit?
number % 10
How do we strip the last digit?
number // 10
How do we get the first digit?
number % 10^(n)
, where n
is the # of digits in number
.
How do we strip the first digit?
number % 10^(n)
Now, we just have to put this all together.
Here’s the Python 3 Code with Test cases.
The time complexity is linear and the space complexity is constant.