"You need 1 big tech or 1 well known startup experience in your resume within first 7-8 years after that even if you do average, atleast you'll get interviews, you'll keep consistently making that bare minimum amount" That was so insightful!
Arpit is one of the most enthusiastic person I have ever come across..been following him for almost 2 years and he always motivates me to dive deeper into everything you are working on..One of the best out there,No doubt.
The art of engineering. Now I can understand why some folks are leaving big techs in early ages and start selling basic courses only and becoming insta influu and giving gyan on internet. 💀
@@unknownspace8160 just talking about some of tech influencers who were in fangs but now they left the org, having max 3 to 4 yrs work exp and now selling dsa, web dev, java spring boot and even sys design courses for college students so that college students can get faang placements
@@unknownspace8160 talking about some well known fang influencers who left orgs to start their ed tech journey. Selling dsa web dev even sys design courses.
Haven't written C in a while but going by pseudo-code, I believe this is how the signature would be. The function is supposed to be able to sort both an array or a linked list. Let's call them collection in general. We'll assume the sort function doesn't know ANYTHING about the data structure. For sorting the function should know how to do the following operations at the bare minimum: 1. Know where start from: start pointer 2. Know how to go to the next item: iterator (func pointer) 3. Know which value among two neighboring values is bigger: comparator (func pointer) 4. Know how to swap 2 values: let's call it mutator for lack of a better term (func pointer) During a in-place merge sort, you can reach mid by calling iterator using slow and fast pointers. During merge, you can call comparator to give you the order in which you need to place the items and then use the mutator to perform the swap. void sort(start, iterator, comparator, mutator) This way we've abstracted away the data structure and that spec can be defined by the function's consumers.
Good one. I also think this is the bare minimum information the function needs to know, that you called 'specs' to be able to do this job. But again, he said, you pass it Array or LInkedLIst, it will do the rest, without needing to know what data structure it is. I wonder if that is possible.
Regarding 49:00 - challenge for the audience, If you do not want to use if else then you need to use an array of function pointers, void* (*sort[2])(void *InitialElement, int length); before calling sort function initialize it with respective functions, sort[0] = sortArray; sort[1] = sortList; get the 'type' of data being worked on and store it in a variable say - 'type'. and basically call, sort[type]; Alternative is to pass a comparator function pointer and depending on the data type the comparison implementation will vary. void* sort(void *InitialElement, int length, void* (*comparator)(void *a, void *b));
Here i think there is no need to make a array also, based on need just point the function pointer to the desired sort function, array just helps to pass a static value
I don't know if I understood correctly. But I don't think we are allowed to determine the type of datastructure being used and calling based on that, because that would basically be like doing if else the hard way. The second options seems more agreeable based on the constraints.
I think we will need an abstraction for getting to next data value as well (because reaching to next data index is different for array vs linkedlist), so maybe void* sort(void InitialDataElement, int length, void (*next_data_element)(void* ptr), void (*comparator_and_swap)(void *a, void *b));
49:47 what i think could be a possible signature: As the sorting function doesn't know about the nature of the "thing" passed (thing could be an array or a linked list), we bring both array and linked list to the same pedestal, by this i mean creating a unified interface that will deal for both. Now we create two wrapper classes, both for an array and a linked list. These two wrapper classes will have similar set of methods as in: getElement, setElement, getLength. These classes will provide a common way to deal with, without the sorting function knowing if its an array or a linked list. Now write the sorting function that will use these common methods provided by the wrappers. It doesn’t care if it’s working on an array or a linked list because the methods behave the same. So finally coming to the raw answer, the function signature would look like: function sort(data) { // Sorting logic using the methods provided by the `data` object. }
Arpit is my undergrad batchmate, and his brilliance was absolutely evident even in the engineering days. Really proud of him for reaching heights in the tech/engineering space. Also great to peer into his journey so far.
You can always convert the methods required on your interface (in the vtable) as function pointers, so for now I'll stick to the OOPS-like notation: 1) First, an observation. Only array allows random-indexing and not linked-list. Therefore, the abstracted sorting algorithm needs to work iteratively on consecutive elements and not jump around a lot -- so that it doesn't perform embarrassingly bad on linked-lists. So, for the purposes of this exercise, let's assume it's bubble-sort (the actual algorithm doesn't really matter other than it can work on consecutive elements). 2) Okay, now that we assumed bubble-sort, let's figure out the basics that are required. First, we need an iterator-like interface/trait where we can ask for the next element of the collection, given the current iterator state. Okay, so: interface List { // T must be comparable with itself. Similar interface in almost all languages. In C, take a function as input that knows how to compare two T's. fn next(self) -> Element; // advances iterator state and returns the next element } 3) More on Element => Element is a smaller class/inner class (or in Rust, an associated type with a slightly different syntax) which simply wraps the actual contained type T. It would be a simple pointer to a T in case of an array, or a Node in case of a linked list. It's the job of the List's concrete type to handle what follows for its concrete implementation of Element. 3) Now, bubble-sort compares the current element with the .next() one to see if it should be swapped or not. To compare these two elements, there must exist a cmp() function. Its implementation should be relatively trivial, as T is already constrained to be Orderable/Comparable. interface List { fn next(self) -> Element; fn cmp(self, t1: Element, t2: Element) -> i32; // to keep it simple, the returned answer is -1 for t1 < t2, 0 for t1 = t2, and 1 for t1 > t2. } 4) Now, after all this, we also need to swap these two Element if the first one turns out to be bigger than the other one. So, we need a swap function. interface List { ... fn swap(self, t1: Element, t2: Element); } 5) This is not strictly necessary, but it would be nice if the iterator is clone-able (deeply copyable) as well. I'm not mentioning it here, but if I were to create the algorithm, I'd keep that as a requirement too (especially since an implementation of an iterator likes this would be very cheaply cloneable). So, this is the final interface: interface List { fn next(self) -> Element; fn cmp(self, t1: Element, t2: Element) -> i32; fn swap(self, t1: Element, t2: Element); }
It depends on the person. I have been a Senior Software Engineer and very happy. Don't want to go up the ladder. People get that FOMO. I was there but understood soon that its not for me. If you are not interested in spending too much time at your job, for god's sake please stop at Senior Software Engineer. Get a remote job and chill. Spend time with your family. Have fun. Also spend time on yourself and your passion. Your passion will earn you lot of money or whatever you choose. You have 1 life. Live it up. So many people higher up the ladder are depressed. Again, this is coming from a Senior Software Engineer who makes much more than his Director :)
Like now i am in 11th class and i started watching your video after 10th class. You know what your are one of those person who motivated me a lot. Bhai agar ap aase ache podcast nhi banate to pta nhi mujhe ye motivation kese milti. Ma bhi apni journey start karne wala hu or Mujhe ummed h ki ma apne goal tak jarur pohchunga. Love ur videos❤ Par mere sath bhi fir apko podcast lena padega?
I read about DiceDB performance, and realized if the numbers are correct, that guy would be amazing good. Now, I listen to this conversation, and realize how much it relates to my current situation in the industry. Thank you so much for this video.
it makes sense...bro grinded programming but paid attention to business operations...i hate coding but i love the scaling solutions that efficient data management brings to tech service startups. bro see if u can get sanjeev sharma from swayatt..hes sick
In the question at last can we use an interface that both Array and LinkedList implements then we can write a sort method that takes that interface (basically utilize polymorphism) to sort it. I think this is what we can do in Java. Curious to know how this could be implemented in C++ as told by Arpit.
As someone did in the comments, one idea is to pass a comparator and iterator (basically telling how to compare and iterate) when using the function with the datastructure being used.
Last question: We can use pair class where we can accept the both data array and linkedlist then we have to check if not null then do sorting Maybe it’s will work 😅
to check if the passed parameter is linked list or array what can we do is check the size of the object or type that it is referring. In case of linked list the object size would be greater than the integer one. then we can simply apply the sorting algo.
Regarding 49:00 - challenge for the audience, If you do not want to use if else then you need to use an array of function pointers, void* (*sort[2])(void *InitialElement, int length); before calling sort function initialize it with respective functions, sort[0] = sortArray; sort[1] = sortList; get the 'type' of data being worked on and store it in a variable say - 'type'. and basically call, sort[type]; Alternative is to pass a comparator function pointer and depending on the data type the comparison implementation will vary. void* sort(void *InitialElement, int length, void* (*comparator)(void *a, void *b));
Yeah, it is exact thumbnails like this which is causing oversaturation in tech - Google does not have 5-6Cr roles for everyone...I fully respect the above 2 guys for where they are, but their circumstances were different to get them to their current positions. It is going to be 2025 soon, and the hiring bar keeps increasing and it just gets harder to filter candidates for companies - good luck grinding LC hards and IQ tests.
I had the chance to work and improve the tools and internal products created by Arpit Bhayani. Never had the chance to meet him in person though. Fun part I had been also administrating the whole infrastructure both dev and prod. Arpit if you are reading, Jkk is still there, had real fun working with him. Alk left though but his code is a diamond mine.
This was the first podcast @Harkirat which I enjoyed. Nahi to yahi hamesha chalta rehta hai, coding karlo, opensource karlo, yeh karlo wo karlo yahna Itta package milega wahna utta package milega.
❤❤❤❤ Worlds Wonderful podcast The podcast should always be like that , so so much informative even I have seen only half of the video now. Two Wonderful tech guys disscusion is very great. It showed me the deepness and beauty of this domain. Thanks sir for these tech disscusion podcast.
"Log hai to kaam bhi dena hai" I feel it, dena to padega, to ab long term plan banana bhi sikhna padega, ab usko sprint me bhi me dalna sikhna padega, ab usme jira ka tadka bhi lagana padega...... aur ye chalta hi jata hai
Can the function be like void sort(*list_start, next func, compare func);? this can work as array and list are addresses and u can override the memory?
I think, answer to the question lies in the basic principles of what Array and Linkedlist is. And if memory addresses are passed to the function directly, then, it doesn't matter which data structure it is. Correct me, if I'm wrong.
i've gotten a huge confidence boost now. i'm not the fastest coder but ik i'm a very good problem solver. i'm currently undergoing training cobol for a bank outside of work i'm learning things slowly in 2 years i'd like to switch to big product based company because i'm sacared i need a structured path
Regarding 49:00 - challenge for the audience, If you do not want to use if else then you need to use an array of function pointers, void* (*sort[2])(void *InitialElement, int length); before calling sort function initialize it with respective functions, sort[0] = sortArray; sort[1] = sortList; get the 'type' of data being worked on and store it in a variable say - 'type'. and basically call, sort[type]; Alternative is to pass a comparator function pointer and depending on the data type the comparison implementation will vary, void* (*comparator)(void *a, void *b); void* sort(void *InitialElement, int length, comparator); //pass the comparator function into the sort function.
Acoording to my knowledge of C, I think declaring the parameter in the function as void pointer would work for both array and linked list, like void sort(void *dataStructure). What you guys think?
A good audio interface like focusrite will do the job. Even the usb condensor mic 🎤 is so good for podcast. if you'll do some audio check before the podcast. Then maybe you can improve the quality.
They are already using condensers, usb most likely, Harkirat’s audio sounds fine, I am assuming other guy’s mic is faulty. The setup is fine, it just a technical glitch.
I have worked in C++, something like that may work. //index operator override Node overrideFunction(Node * x, int index){ int i = 0; while(inext; i++; } return x->value; } void sort(T * head, int size){ // n-square sort function :( for (int i = 0; i < size - 1; i++) { for (int j = 0; j < size - i - 1; j++) { if (head[j] > head[j + 1]) { T temp = head[j]; head[j] = head[j + 1]; head[j + 1] = temp; } } } }
Apologies for the audio folks
Time to get shureSM7B or a MV7
💩
now it become trend
No worries caption h na😂
Those people who stayed inspite of the audio quality know what gem of person is Arpit bhayani
exactly only stayed for him
yes
"You need 1 big tech or 1 well known startup experience in your resume within first 7-8 years
after that even if you do average, atleast you'll get interviews, you'll keep consistently making that bare minimum amount"
That was so insightful!
5-6 cr in a year??????
@@Learnerox.123 I think he meant at retirement 😅
That quote "Saying yes and figuring out things on the Go"
Timestamp please 🙏
first time seeing someone whos is giving hard time to Kirat !!
There are many good engineers who can give him hard time…. It is just that they are not much into public eyes
@abhaybhardwaj4513 yeah true
Bro Harkirat, Please invest in a nice podcast setup. Audio quality can be much better. Though the content is as always one of a kind and inspiring.
Yes seems like it was recorded in a bathroom
Arpit is one of the most enthusiastic person I have ever come across..been following him for almost 2 years and he always motivates me to dive deeper into everything you are working on..One of the best out there,No doubt.
Bro's content 🗿
Bro's setup 🤡
One of the best podcast kirat... his attitude is truly exceptional! ❤️
The art of engineering. Now I can understand why some folks are leaving big techs in early ages and start selling basic courses only and becoming insta influu and giving gyan on internet. 💀
Can you explain?
They can't climb to top
@@unknownspace8160 just talking about some of tech influencers who were in fangs but now they left the org, having max 3 to 4 yrs work exp and now selling dsa, web dev, java spring boot and even sys design courses for college students so that college students can get faang placements
@@unknownspace8160 talking about some well known fang influencers who left orgs to start their ed tech journey. Selling dsa web dev even sys design courses.
@@unknownspace8160 work less, earn more and stay away from losing your hair.
Haven't written C in a while but going by pseudo-code, I believe this is how the signature would be.
The function is supposed to be able to sort both an array or a linked list. Let's call them collection in general.
We'll assume the sort function doesn't know ANYTHING about the data structure. For sorting the function should know how to do the following operations at the bare minimum:
1. Know where start from: start pointer
2. Know how to go to the next item: iterator (func pointer)
3. Know which value among two neighboring values is bigger: comparator (func pointer)
4. Know how to swap 2 values: let's call it mutator for lack of a better term (func pointer)
During a in-place merge sort, you can reach mid by calling iterator using slow and fast pointers. During merge, you can call comparator to give you the order in which you need to place the items and then use the mutator to perform the swap.
void sort(start, iterator, comparator, mutator)
This way we've abstracted away the data structure and that spec can be defined by the function's consumers.
Good one. I also think this is the bare minimum information the function needs to know, that you called 'specs' to be able to do this job.
But again, he said, you pass it Array or LInkedLIst, it will do the rest, without needing to know what data structure it is. I wonder if that is possible.
Great bro!
Regarding 49:00 - challenge for the audience,
If you do not want to use if else then you need to use an array of function pointers,
void* (*sort[2])(void *InitialElement, int length);
before calling sort function initialize it with respective functions,
sort[0] = sortArray;
sort[1] = sortList;
get the 'type' of data being worked on and store it in a variable say - 'type'.
and basically call,
sort[type];
Alternative is to pass a comparator function pointer and depending on the data type the comparison implementation will vary.
void* sort(void *InitialElement, int length, void* (*comparator)(void *a, void *b));
Here i think there is no need to make a array also, based on need just point the function pointer to the desired sort function, array just helps to pass a static value
I don't know if I understood correctly. But I don't think we are allowed to determine the type of datastructure being used and calling based on that, because that would basically be like doing if else the hard way.
The second options seems more agreeable based on the constraints.
I think we will need an abstraction for getting to next data value as well (because reaching to next data index is different for array vs linkedlist), so maybe
void* sort(void InitialDataElement, int length, void (*next_data_element)(void* ptr), void (*comparator_and_swap)(void *a, void *b));
49:47 what i think could be a possible signature:
As the sorting function doesn't know about the nature of the "thing" passed (thing could be an array or a linked list), we bring both array and linked list to the same pedestal, by this i mean creating a unified interface that will deal for both. Now we create two wrapper classes, both for an array and a linked list. These two wrapper classes will have similar set of methods as in: getElement, setElement, getLength.
These classes will provide a common way to deal with, without the sorting function knowing if its an array or a linked list.
Now write the sorting function that will use these common methods provided by the wrappers. It doesn’t care if it’s working on an array or a linked list because the methods behave the same. So finally coming to the raw answer, the function signature would look like:
function sort(data) {
// Sorting logic using the methods provided by the `data` object.
}
That's OOPS, He said you can code it in C
@@LushGreeen Doesn't matter, you can abstract away the methods in your vtable as other function pointers being passed in.
Loved the insights about tech from two seasoned techies. No issues with audio, when you know the gem they are talking about.
to be honest only Arpit is seasoned
Arpit is my undergrad batchmate, and his brilliance was absolutely evident even in the engineering days. Really proud of him for reaching heights in the tech/engineering space. Also great to peer into his journey so far.
kyaa khatarnaak bhaiya hai bhai , explaining such ultra hard concepts very casually .
These are some very deep insights you will not get elsewhere. Specially how big tech handle large data. Kudos to Arpit for sharing that.
Crazy insights loaded podcast ❤️✨.
If possible can we expect Mr. Kai (Kailash Nadh) in the next podcast please please please .... 🤌🤌🤌🤌🤌
You can always convert the methods required on your interface (in the vtable) as function pointers, so for now I'll stick to the OOPS-like notation:
1) First, an observation. Only array allows random-indexing and not linked-list. Therefore, the abstracted sorting algorithm needs to work iteratively on consecutive elements and not jump around a lot -- so that it doesn't perform embarrassingly bad on linked-lists. So, for the purposes of this exercise, let's assume it's bubble-sort (the actual algorithm doesn't really matter other than it can work on consecutive elements).
2) Okay, now that we assumed bubble-sort, let's figure out the basics that are required. First, we need an iterator-like interface/trait where we can ask for the next element of the collection, given the current iterator state. Okay, so:
interface List { // T must be comparable with itself. Similar interface in almost all languages. In C, take a function as input that knows how to compare two T's.
fn next(self) -> Element; // advances iterator state and returns the next element
}
3) More on Element => Element is a smaller class/inner class (or in Rust, an associated type with a slightly different syntax) which simply wraps the actual contained type T. It would be a simple pointer to a T in case of an array, or a Node in case of a linked list. It's the job of the List's concrete type to handle what follows for its concrete implementation of Element.
3) Now, bubble-sort compares the current element with the .next() one to see if it should be swapped or not. To compare these two elements, there must exist a cmp() function. Its implementation should be relatively trivial, as T is already constrained to be Orderable/Comparable.
interface List {
fn next(self) -> Element;
fn cmp(self, t1: Element, t2: Element) -> i32; // to keep it simple, the returned answer is -1 for t1 < t2, 0 for t1 = t2, and 1 for t1 > t2.
}
4) Now, after all this, we also need to swap these two Element if the first one turns out to be bigger than the other one. So, we need a swap function.
interface List {
...
fn swap(self, t1: Element, t2: Element);
}
5) This is not strictly necessary, but it would be nice if the iterator is clone-able (deeply copyable) as well. I'm not mentioning it here, but if I were to create the algorithm, I'd keep that as a requirement too (especially since an implementation of an iterator likes this would be very cheaply cloneable).
So, this is the final interface:
interface List {
fn next(self) -> Element;
fn cmp(self, t1: Element, t2: Element) -> i32;
fn swap(self, t1: Element, t2: Element);
}
I like how arpit sir gave credits to people who he worked with...
I learned what it takes to be great leader! Loved it ❤, Thanks Harkirat sir
The frequent echo coming from the guest's mike is spoiling the podcast.
very detailed and informative video I saw in a very while...
Loved this one...
Thanks Kirat bhaiya and Arpit bhaiya❤
It depends on the person. I have been a Senior Software Engineer and very happy. Don't want to go up the ladder.
People get that FOMO. I was there but understood soon that its not for me.
If you are not interested in spending too much time at your job, for god's sake please stop at Senior Software Engineer.
Get a remote job and chill. Spend time with your family. Have fun. Also spend time on yourself and your passion. Your passion will earn you lot of money or whatever you choose.
You have 1 life. Live it up. So many people higher up the ladder are depressed.
Again, this is coming from a Senior Software Engineer who makes much more than his Director :)
Are you for real? Why is that FOMO? How did you concluded that its not for you? Can you detail?
You are living my dream.
Hahahahaha making more than a director? Did your Xanax wear off?
Like now i am in 11th class and i started watching your video after 10th class. You know what your are one of those person who motivated me a lot. Bhai agar ap aase ache podcast nhi banate to pta nhi mujhe ye motivation kese milti. Ma bhi apni journey start karne wala hu or Mujhe ummed h ki ma apne goal tak jarur pohchunga. Love ur videos❤
Par mere sath bhi fir apko podcast lena padega?
"Practically start to code" is personal!
He looks like a nerdier version of Rahul Subramanian.
🤣
Worked with Arpit Bhayani in same team at GCP - Dataproc in the past :)
I read about DiceDB performance, and realized if the numbers are correct, that guy would be amazing good. Now, I listen to this conversation, and realize how much it relates to my current situation in the industry. Thank you so much for this video.
nice one buddy ! Keep bringing folks like him who are actually passionate about engineering as a domain.
it makes sense...bro grinded programming but paid attention to business operations...i hate coding but i love the scaling solutions that efficient data management brings to tech service startups. bro see if u can get sanjeev sharma from swayatt..hes sick
In the question at last can we use an interface that both Array and LinkedList implements then we can write a sort method that takes that interface (basically utilize polymorphism) to sort it. I think this is what we can do in Java. Curious to know how this could be implemented in C++ as told by Arpit.
As someone did in the comments, one idea is to pass a comparator and iterator (basically telling how to compare and iterate) when using the function with the datastructure being used.
Amazing video, amazing insights !
awesome podcast !! Best podcast for me that i wanted at the moment for my life....
Out of everything this was your takeaway. Guessed the thumbnail straight away
Great podcast, superb insights. Wish to see more such content from such great tech experts
Last question:
We can use pair class where we can accept the both data array and linkedlist then we have to check if not null then do sorting
Maybe it’s will work 😅
if else is not allowed
to check if the passed parameter is linked list or array what can we do is check the size of the object or type that it is referring. In case of linked list the object size would be greater than the integer one. then we can simply apply the sorting algo.
52:00 can anyone explain the ans in the comment section?? becoz of audio quality didn't able to understand it that much 3>
Regarding 49:00 - challenge for the audience,
If you do not want to use if else then you need to use an array of function pointers,
void* (*sort[2])(void *InitialElement, int length);
before calling sort function initialize it with respective functions,
sort[0] = sortArray;
sort[1] = sortList;
get the 'type' of data being worked on and store it in a variable say - 'type'.
and basically call,
sort[type];
Alternative is to pass a comparator function pointer and depending on the data type the comparison implementation will vary.
void* sort(void *InitialElement, int length, void* (*comparator)(void *a, void *b));
In this age of Doom and Gloom in Tech. This gave a very positive outlook why our domain is so vibrant!
Yeah, it is exact thumbnails like this which is causing oversaturation in tech - Google does not have 5-6Cr roles for everyone...I fully respect the above 2 guys for where they are, but their circumstances were different to get them to their current positions. It is going to be 2025 soon, and the hiring bar keeps increasing and it just gets harder to filter candidates for companies - good luck grinding LC hards and IQ tests.
I had the chance to work and improve the tools and internal products created by Arpit Bhayani. Never had the chance to meet him in person though. Fun part I had been also administrating the whole infrastructure both dev and prod.
Arpit if you are reading, Jkk is still there, had real fun working with him. Alk left though but his code is a diamond mine.
best one so far harkirat!!!
Amazing personality😍😍
Such an insightful podcast
Can use generic function, for the sorting, the generic function can handle both arrays and linked lists by using function pointers.
It's interesting to see two great intellects communicate with each other.
One of the few videos I watched in one go. too good :)
The "never ready" thing hit me hard Arpit!
This is crazy. Two great tech giants who I follow closely for their content and bad ass videos are in single frame 😀
This was the first podcast @Harkirat which I enjoyed. Nahi to yahi hamesha chalta rehta hai, coding karlo, opensource karlo, yeh karlo wo karlo yahna Itta package milega wahna utta package milega.
Answer is Bubble sort.
Linked List we can get element and next element only.
then a function of swap element from using a temp variable.
one of the best podcast except audio quality.
even harkirat became intervieweee🤣
❤❤❤❤
Worlds Wonderful podcast
The podcast should always be like that , so so much informative even I have seen only half of the video now.
Two Wonderful tech guys disscusion is very great.
It showed me the deepness and beauty of this domain.
Thanks sir for these tech disscusion podcast.
This was gold.... ❤
@3:26 IIIT Hyderabad, not IIT. Caption is wrong.
loved the podcast.
Very inspiring ❤❤❤
The OG Arpit Bhayani 🙌
"Log hai to kaam bhi dena hai" I feel it, dena to padega, to ab long term plan banana bhi sikhna padega, ab usko sprint me bhi me dalna sikhna padega, ab usme jira ka tadka bhi lagana padega...... aur ye chalta hi jata hai
Never Kirat would have thought that arpit taping table could duck the audio so much
excellent!
How about using templating in context to question of passing arrays or linkedlist ?
Can the function be like void sort(*list_start, next func, compare func);?
this can work as array and list are addresses and u can override the memory?
Two people who I admire most in one video ❤
This was better than a thriller movi❤ thank you, Harkirat for this podcast.
I think, answer to the question lies in the basic principles of what Array and Linkedlist is. And if memory addresses are passed to the function directly, then, it doesn't matter which data structure it is. Correct me, if I'm wrong.
Best talk!
Two goats 🐐 ❤
Bubble sort it's swapping operations can be done on both array and linkedlists
i've gotten a huge confidence boost now. i'm not the fastest coder but ik i'm a very good problem solver. i'm currently undergoing training cobol for a bank outside of work i'm learning things slowly in 2 years i'd like to switch to big product based company because i'm sacared i need a structured path
Heap
Regarding 49:00 - challenge for the audience,
If you do not want to use if else then you need to use an array of function pointers,
void* (*sort[2])(void *InitialElement, int length);
before calling sort function initialize it with respective functions,
sort[0] = sortArray;
sort[1] = sortList;
get the 'type' of data being worked on and store it in a variable say - 'type'.
and basically call,
sort[type];
Alternative is to pass a comparator function pointer and depending on the data type the comparison implementation will vary,
void* (*comparator)(void *a, void *b);
void* sort(void *InitialElement, int length, comparator); //pass the comparator function into the sort function.
Gem 💎
Acoording to my knowledge of C, I think declaring the parameter in the function as void pointer would work for both array and linked list, like void sort(void *dataStructure). What you guys think?
Aerospike already has that super-cache tag right?
Two legends in a frame 🎉❤
for the last part, simple to use pointer for array or linkedlist doesnt matter .isn't it? like *(ptr+1)
Arpit sir is an absolute legend!! have been following him on LinkedIn for a while.
what was the answer of the last question anybody knows about it ?
what does he mean by "zero trust on employees"? 20:57
hey harkirat, please tell me if when are you gonna launch a new course. please anyone else if you know then let me
know
My approach to solution would be method overloading 🙂
Void sort (Iterator begin, iterator end) {
}
Both Legit Engineers in One Frame
very Informative
A good audio interface like focusrite will do the job.
Even the usb condensor mic 🎤 is so good for podcast.
if you'll do some audio check before the podcast. Then maybe you can improve the quality.
They are already using condensers, usb most likely, Harkirat’s audio sounds fine, I am assuming other guy’s mic is faulty. The setup is fine, it just a technical glitch.
@@shivpratapsingh2881 But in his mostly videos sound is bit glitchy.
I have worked in C++, something like that may work.
//index operator override
Node overrideFunction(Node * x, int index){
int i = 0;
while(inext;
i++;
}
return x->value;
}
void sort(T * head, int size){
// n-square sort function :(
for (int i = 0; i < size - 1; i++) {
for (int j = 0; j < size - i - 1; j++) {
if (head[j] > head[j + 1]) {
T temp = head[j];
head[j] = head[j + 1];
head[j + 1] = temp;
}
}
}
}
"A generic [sortContainer] function that takes a container, such as an array or linked list, and sorts it without needing to know the container type."
Bro I respect you but you have to stop with these "5 crore placement" just to sell your course...
So informative
the echo is crazy but still its always fuin ti hear arpit talk about tech
I think disabling stable volume in TH-cam helps
can anyone explain me the answer if they able to get if from the last part cuz the audio is messed up i didn't understand what they are saying
Why in your most of the podcast audio quality is too poor
sorry but where is github repo link ?
Thank you so so much
Will there be another batch of super30?
Content is awesome but the audio quality needs to be improved
I hope further audio quality will great
how to improve visibility & build knowledge sharing culture as remote developer?
pls make a video on it
bhaiya video mein sound stable nahi rehta hai
49:50 can be done using function overloading I guess. Not sure about how yo do in C language. Guess I will come later and edit this😅
Bro what are those transcripts?