Maven Securities Interview Question - Template Metaprogramming
ฝัง
- เผยแพร่เมื่อ 29 ต.ค. 2022
- In this video I have explained Maven Securities Interview Question based on Template Metaprogramming.
Things covered:
- C++ Templates
- Full specialization of templates
- Partial specialization of templates
- Variadic Templates
- Default template arguments, Non-type templates arguments
About Maven Securities:
Maven is a leading market maker and proprietary trading firm. They are one of the HIGHEST PAYERS in the market and the company is filled with some of the smartest people.
Website: www.mavensecurities.com/
_________________________________________________________________________
Connect with me on Instagram: / shubham__cr7
do their hire from tier 1 college apart from IIT's
I don't know. I have mostly seen only IITians at Maven
Does this question have to be using templates? Why not a constexpr function?
This Vector struct does not have any members to access the values stored in it. The values are all template arguments. I don't think you can solve it by just using a constexpr function. How would iterate over the elements in the Vector struct template?
Can you paste the code snippet here, if you have any idea in mind?
I thought about this again and I came up with a couple of more solutions for this question. We can also do it using constexpr function. We can iterate over the elements of Vector struct using C++ 17 fold expressions.
I will post link to my solutions here.
@@CodingInterviewPrep Sorry I cant find the link here