Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save kellatirupathi/3d586efa9596d609294ae5579a7f16ec to your computer and use it in GitHub Desktop.

Select an option

Save kellatirupathi/3d586efa9596d609294ae5579a7f16ec to your computer and use it in GitHub Desktop.
Transcript for transcript_1hyk8EAzQ0ZtJqZwU6mAM3T6Eogk9t7Xo_1_3840_cbb0530277ef_6.txt
[00:03:20] Hi, Arshita.
[00:03:21] So I just joined the meeting whether the candidate has joined or not.
[00:03:26] Okay, so hence the candidate is in the meeting.
[00:03:29] So I'll be leaving the meeting.
[00:03:30] Okay.
[00:03:31] Yeah, thanks.
[00:03:32] Thank you.
[00:03:36] Hey, hello.
[00:03:41] Hello, good evening ma'am.
[00:03:45] Can you please quickly introduce yourself?
[00:03:47] Yes ma'am, my name is Venkat Karthikeya, currently pursuing B.Tech Throud here in Narayan Indian College, graduating in 2027.
[00:03:54] My core technical skills include HTML, CSS, JavaScript, React, JS, Node.js, SQL and MongoDB.
[00:04:01] Welcome to my programming skills, Python, C++, and...
[00:04:05] Java and I enjoy building full step web applications.
[00:04:09] So one particular project I'm proud of is attendance management system, which was built for faculty and students to manage attendance by using voice assistant.
[00:04:16] And there are many features like schedulers, leave requests, many other things.
[00:04:21] And while coming to the tech stack of this project, I built.
[00:04:25] end-to-end using react for the front end node with express for the back end and mongo db for the database i'm passionate about full stack web applications i'm currently looking for a role where i can build real world problems which can solve real user problems so
[00:04:41] i'm excited about this opportunity at careco i did love to contribute and grow here
[00:04:48] My goal is to get placed in a job before the graduation and my hobbies are reading novels, watching anime and browsing the internet.
[00:04:55] That's all about me.
[00:04:57] Got it.
[00:04:58] I'll just quickly introduce ourselves.
[00:05:00] I'm Harshita Adar.
[00:05:01] I'm currently part of the Careco Technologies team.
[00:05:04] And with me, I have Shruti.
[00:05:07] She's also part, she's a colleague with me.
[00:05:10] We will be conducting your interview.
[00:05:11] Hello.
[00:05:13] Hello, good evening.
[00:05:17] Okay.
[00:05:19] So can you just quickly share your screen and show us a project of your choice?
[00:05:24] Any project is fine.
[00:05:25] We would like to look at the code base as well.
[00:05:28] And if you have something deployed or maybe run it on local, either way is fine.
[00:05:33] Okay.
[00:05:35] Ma'am, is it visible, ma'am?
[00:05:36] I have shared my screen.
[00:05:37] Yeah, it's visible.
[00:05:41] This is the project, M.
[00:05:42] Hattness Management Portal.
[00:05:43] Whenever I have logged in as a faculty, faculty can select the section and mark the attendance.
[00:05:51] He can use the voice assistant like whenever we are speaking one present to present, automatically it will take the attendance and mark the student.
[00:05:59] I think the backend is taking time to get the details of the student.
[00:06:04] Okay.
[00:06:05] That's the main concept I have presented and while coming to the
[00:06:14] No, can you go back to the front advance?
[00:06:18] Yeah.
[00:06:19] So what happens if I say something apart from absent?
[00:06:22] Like, obviously, someone's not going to say if any person is not going to say it will automatically take like.
[00:06:30] Means already there will be students all like present only we should say the absent is who are absent but whenever there is a disturbance it will automatically don't take the disturbance voices like whenever a student
[00:06:44] in classroom there will be disturbance no ma'am it will automatically eject the details like like shoutings or else disturbance this for this i have used nlp
[00:06:55] And here you can see, ma'am, this is the...
[00:06:57] So what happens if maybe I'm a student, I said present, but there's a lot of noise and my voice never reached your system.
[00:07:07] Okay.
[00:07:08] So I was marked absent.
[00:07:10] Does the teacher have an option or something that he or she can mark me present again?
[00:07:15] Yes, ma'am.
[00:07:16] The teacher has the option.
[00:07:17] Like whenever the process is completed, whenever we are submitting, it will show again like the absentees details.
[00:07:26] So the teacher can say like these are the absentees.
[00:07:30] If some person like there was a mistake in marking the attendance, it can resubmit it.
[00:07:38] Got it.
[00:07:38] Understood.
[00:07:39] Yeah, you were showing us the code, please, I guess.
[00:07:43] Code.
[00:07:51] Also, what types of users does the project has?
[00:07:55] The HOD, faculty, student and mentor.
[00:07:59] HOD manages all the details of the student, means present is all the details.
[00:08:03] And mentor's duty is to, whenever a student is absent, he should contact the parents and means what is the reason.
[00:08:13] It's sort of a garden faculty for the students.
[00:08:17] This was the front end for the application and this was the back end.
[00:08:21] So, I'm interested.
[00:08:24] Is there some functionality difference between what an HOD can do, what a faculty can do and a student?
[00:08:31] Yes, ma'am.
[00:08:35] Functionality means like HOD can add students also.
[00:08:40] Not only that, I have also implemented a new feature like whenever a student is absent for consecutive three days, the student's attendance will be blocked automatically.
[00:08:50] He should consult the HOD to unblock the attendance so that only
[00:08:55] Whenever he go to the feature and also I have implemented a leave request like whenever a student means wants to take leave, he should inform through his portal to the mentor.
[00:09:08] The mentor should.
[00:09:09] If the mentor didn't approve and the student takes a leave, it means it will again convert the blockage and he should cancel the HOD.
[00:09:20] So are you saying if I as a student requested leave, my mentor approves it, so then I won't be blocked if I'm absent for three days?
[00:09:29] Yes, ma'am.
[00:09:30] If the approval is guaranteed, means if it is approved.
[00:09:35] But what if I was approved a two-day leave?
[00:09:39] You have approved a two-day leave.
[00:09:40] It means if he is optioned for a single extra day also, it will be blocked.
[00:09:45] Okay, got that.
[00:09:47] Yeah, can you show us the code base?
[00:09:49] Yes, please.
[00:10:00] Build the front end using React, right?
[00:10:02] Yes.
[00:10:02] No, ma'am.
[00:10:03] This was a TypeScript.
[00:10:10] No, I wanted to see the code actually.
[00:10:14] Do you not have it on code editor or something?
[00:10:17] Means like I don't have the files in local currently.
[00:10:21] Okay, that's fine.
[00:10:22] I have reached set it to the laptop.
[00:10:24] So I...
[00:10:25] That's okay.
[00:10:25] Can you just maybe go inside the folders?
[00:10:28] It would list the files on the left, right?
[00:10:31] That would be fine too.
[00:10:33] Ma'am, should I show the front end or back end?
[00:10:36] First, let me see the front end.
[00:10:38] Okay.
[00:10:48] Peace out.
[00:10:54] This is the admin page, attendance page.
[00:10:58] How are you logging someone in?
[00:11:01] I mean, are you using some cookies or something?
[00:11:05] No, ma'am.
[00:11:06] It was normal.
[00:11:08] It means like I have stored the data, like the password.
[00:11:12] I will show here.
[00:11:15] Like normally these are the means dummy data, they more logins only.
[00:11:20] Okay.
[00:11:22] I haven't added any JWT token also.
[00:11:25] This was a basic project like project.
[00:11:30] So are you like have you implemented protected endpoints?
[00:11:37] Protected endpoints.
[00:11:39] I mean, so let's say I am a student and I'm trying to access a faculty's endpoint for some XYZ.
[00:11:48] Ma'am, it was only possible when the student knows the email and password only.
[00:11:54] If means the faculty should not leak his email or password to the student.
[00:12:01] No, that is not my question.
[00:12:02] Okay, ma'am.
[00:12:03] Okay, ma'am.
[00:12:03] I understood.
[00:12:04] Like you are saying you should like.
[00:12:09] You should build a different portal like that, ma'am.
[00:12:13] Can you just log into a faculty, please?
[00:12:29] This is the faculty portal.
[00:12:31] This was only for marking attendance.
[00:12:33] Can you just copy the URL on the top?
[00:12:39] Now log out.
[00:12:45] and try to access that URL.
[00:12:48] I think it will work.
[00:12:52] It hasn't worked.
[00:12:56] Okay, so let me ask it again.
[00:12:58] Was it supposed to work or was it supposed to not work according to your understanding of the code base?
[00:13:04] I haven't tried this thing.
[00:13:08] Okay.
[00:13:13] Yeah, go back to the code page.
[00:13:16] This is the admin portal.
[00:13:18] Admin portal.
[00:13:20] Can you show me where have you defined student?
[00:13:23] Go back, please.
[00:13:25] Student dashboard.
[00:13:27] This is the student dashboard.
[00:13:29] No, no, no.
[00:13:30] Scroll up.
[00:13:33] No, this wasn't the file.
[00:13:36] You showed some file previously, no?
[00:13:40] What?
[00:13:40] Which one?
[00:13:42] I forgot.
[00:13:42] I do management.
[00:13:44] Yeah, this one.
[00:13:47] So for use effect, you have mentioned student array, right?
[00:13:54] Can you show me the type that you've declared for student?
[00:14:00] But use effect, okay.
[00:14:02] Okay, on line number 10, you have imported student, right?
[00:14:06] Yes, ma'am.
[00:14:07] I want to see the structure first.
[00:14:25] Where are you finding it?
[00:14:28] Pipes.
[00:14:46] Do you understand how imports work?
[00:14:48] Yes, ma'am.
[00:14:49] Yes, ma'am.
[00:14:49] We have to import the data from another file.
[00:14:54] I'm searching for the types file.
[00:14:57] So you are using double lots, right?
[00:15:00] Would be outside the experience.
[00:15:08] Should be out of the pages on them services
[00:15:18] This is the student.
[00:15:19] Okay.
[00:15:21] I'm sorry.
[00:15:21] On line number four, you have used a question mark after password.
[00:15:26] What does that mean?
[00:15:30] Like, it was a terminator, like, ternary operator.
[00:15:38] Are you sure it's a ternary operator user here?
[00:15:47] Okay.
[00:15:48] Go back to the file that you were showing earlier.
[00:15:51] What was it?
[00:15:52] The top most right now.
[00:15:56] Okay.
[00:15:56] Can you tell me what are hooks in React?
[00:16:01] Hooks are like, we use hooks to manage the unwanted components or like side effects to
[00:16:15] Okay, forget it.
[00:16:17] Can you tell me the difference between useState and useEffect?
[00:16:21] Yes, ma'am.
[00:16:21] UseState is to record the states which we are like the state.
[00:16:27] It can store the states of the component or like that.
[00:16:30] UseEffect is to remove the side effects which are caused due to the.
[00:16:36] Due to accessing the components.
[00:16:39] What side effects are you talking about?
[00:16:42] Side effects means like?
[00:16:45] So, okay.
[00:16:54] Do you know what is async and await?
[00:16:56] Yes, ma'am.
[00:16:58] Can you explain?
[00:16:59] Async and await means like whenever we want to like synchronous, normally we have to use synchronous tasks, ma'am.
[00:17:08] Whenever we want to use asynchronous tasks, we use async and await.
[00:17:13] Which can make like whenever the previous code is executing, previous task is executing, the next task will also start executing simultaneously.
[00:17:22] This is the use of async and await.
[00:17:25] Okay.
[00:17:28] How much would you rate yourself for React?
[00:17:33] For React, 8.
[00:17:35] I am currently in the learning phase only.
[00:17:38] 8 out of 10?
[00:17:40] Yes.
[00:17:41] Okay.
[00:17:47] Tell me what is dependence here in use effect?
[00:17:52] Dependency array like whenever the dependency array is empty it it will be calling single time only means like the mounted component will be called single time whenever the dependence
[00:18:07] array is
[00:18:20] What backend do you generally work with?
[00:18:23] Node.js.
[00:18:25] And for frontend?
[00:18:26] Frontend, React.js and TypeScript.
[00:18:30] Mostly React.js only, TypeScript is normal.
[00:18:34] Okay.
[00:18:36] So what databases do you work with generally?
[00:18:40] Generally, SQL Mem and MongoDB is the second thing.
[00:18:45] Do you think if I give you a basic problem statement for connectivity between Node and MongoDB, you'd be able to do that?
[00:18:55] Yes, ma'am.
[00:18:56] Okay.
[00:18:57] Can you open a notepad, please?
[00:19:18] So the question is, you have two collections in MongoDB.
[00:19:24] Collection 1 and collection 2.
[00:19:26] You have to...
[00:19:28] You can do it in SQL.
[00:19:31] For code implementation, I have done totally in SQL.
[00:19:34] MongoDB was...
[00:19:37] Like learning phase only.
[00:19:39] Got it.
[00:19:42] Fine.
[00:19:43] Let me change the problem to SQL then.
[00:19:46] Okay.
[00:19:47] You have a student's collection.
[00:19:50] I'm sorry, student's table.
[00:19:52] Yes, ma'am.
[00:19:53] And you need to fetch all the students who have their roll number less than or equal to
[00:20:00] into 50.
[00:20:01] Okay.
[00:20:12] What SQL DB do you use?
[00:20:15] Normal MySQL and SQLite.
[00:20:17] Okay, got it.
[00:20:18] Please continue.
[00:20:25] Are you connecting Node with SQL?
[00:20:31] Is that what you're doing?
[00:20:32] Yes, ma'am.
[00:20:33] It's okay.
[00:20:34] You just can simply write the query itself in SQL.
[00:20:38] Okay.
[00:21:05] This was...
[00:21:06] I'll change the problem a little.
[00:21:08] Okay.
[00:21:09] You have to fetch the students whose city is neither Pune nor Mumbai.
[00:22:26] Is that her?
[00:22:37] was not correct.
[00:22:43] Can you maybe think a little harder for us?
[00:22:46] Ma'am?
[00:22:47] Can you maybe brainstorm a bird?
[00:22:50] This is not right.
[00:22:51] Yes, ma'am.
[00:22:52] It is not right.
[00:23:46] You are on the right track.
[00:23:48] Can you complete it?
[00:24:04] Is it correct?
[00:24:06] No, this is wrong.
[00:24:19] Okay.
[00:24:20] Yeah, this is fine.
[00:24:21] Can you maybe think of a different approach for this one?
[00:24:24] There's one more approach at least.
[00:24:28] Normally we can use not in means whenever we use in.
[00:24:34] How can you use that?
[00:24:35] Can you try it?
[00:24:39] means it can be usable for a single element only like pune or city not in pune means
[00:24:47] okay are you saying you can use not in with a single element yes like previously i have written okay got it uh it's okay you can just leave it go back to your code base
[00:25:03] Okay.
[00:25:05] So how have you protected your URL?
[00:25:08] We just tried when you were not logged in.
[00:25:10] Yes.
[00:25:11] So we couldn't access your faculty thing.
[00:25:15] Normally by using routing.
[00:25:19] By using routing.
[00:25:22] No, but routing only tells you what function to be called when you hit an endpoint.
[00:25:29] Yes, ma'am.
[00:25:30] How are you managing that when you are not logged in, you cannot access a faculty dashboard?
[00:25:37] Where is that piece of code?
[00:26:07] Are you sure you would find it on the front end?
[00:26:17] We can find it through Fenton only.
[00:26:19] I have written it.
[00:26:22] Okay.
[00:27:07] Normally we can find it in like home page like app.js main page.
[00:27:13] We can use the routing to move on to the next page and whenever we log out it will automatically remove the like the endpoint from the
[00:27:26] URL itself only.
[00:27:27] Like not only URL itself, whenever we try to again login, it won't accept it until we click the login button.
[00:27:38] You're saying it would remove the endpoint?
[00:27:41] Yes, ma'am.
[00:27:45] Okay.
[00:27:45] Can you find that piece of code in app.js?
[00:27:49] Or app.tsx for doctors?
[00:27:53] No, the file was down at the bottom.
[00:27:58] No, no, no.
[00:28:00] I will concentrate.
[00:28:00] Yeah.
[00:28:05] This is the main thing, protected routing level.
[00:28:12] We should use the protected routing for the routing purpose whenever the person is not logged in, whenever we access the URL, it can't be logged in.
[00:28:25] Okay, can you go back to your front end once again?
[00:28:29] No, no, the UI.
[00:28:31] UI.
[00:28:35] Do you still have the faculty URL copied on a clipboard?
[00:28:41] Yes, ma'am.
[00:28:43] Got it.
[00:28:44] Now go back to the login and login as a student.
[00:29:05] It was taking time.
[00:29:09] It'll be logged in.
[00:29:22] Till it is logging.
[00:29:23] Have you ever tried Python?
[00:29:25] Yes, ma'am.
[00:29:27] How confident are you about it?
[00:29:30] Python has been my book.
[00:29:32] 8.5.
[00:29:36] Have you ever tried Django?
[00:29:38] No, no.
[00:29:39] Means I have...
[00:29:40] Like just for the programming language, I know Python.
[00:29:45] I never worked with any backend thing in Python.
[00:29:48] I have worked with Flask API for one time only.
[00:29:53] That was also, it was a framework, so it is easy to use it.
[00:30:04] I think it will be.
[00:30:06] Now, in the URL box, not the other browser, go to the same tab.
[00:30:14] Okay.
[00:30:17] Now put that particular security URL.
[00:30:29] Remember, it is only accessing student dashboard.
[00:30:32] And why is that?
[00:30:35] The means like
[00:30:39] The website is currently in this endpoint, like student dashboard.
[00:30:45] Whenever we access any other endpoint, it is redirecting to the student dashboard.
[00:30:50] Can you show me where is that piece of code?
[00:31:18] here the user based on the user role and where you're getting the user role from while we are submitting the entering password and
[00:31:32] No, no.
[00:31:32] Where is get dashboard path called from?
[00:31:51] It's there online for you.
[00:31:54] It was a doctor.
[00:31:57] Here it was.
[00:31:59] What?
[00:32:00] Okay, you did use .org and now they get to know.
[00:32:04] And then you have just, oh, okay, got it.
[00:32:07] Here it was calling the function.
[00:32:09] It was a doctor.
[00:32:11] Okay.
[00:32:12] Okay.
[00:32:15] I'm going to give you a problem statement.
[00:32:23] What language do you code in?
[00:32:27] Python, Java, C++, also, but mainly Python and Java.
[00:32:34] Got it.
[00:32:34] Okay.
[00:32:43] Oh, is there something that you maybe want to show in the back end?
[00:33:05] and I have used the seed.as.
[00:33:08] Okay, what is that?
[00:33:10] Seeded data.
[00:33:11] Like, means I have done it like CSC 12 to 120.
[00:33:17] Like that numbers that I have entered the data into the MongoDB.
[00:33:22] Okay.
[00:33:23] This was db.js.
[00:33:25] Long gone data.
[00:33:28] For accessing through the front end only, I have accessing this package.
[00:33:34] This is a MongoDB connector.
[00:33:35] Can you...
[00:33:37] Okay, no.
[00:33:38] You...
[00:33:39] Okay, let me just get it straight.
[00:33:42] You said you're not very confident in MongoDB, right?
[00:33:46] It's been a mess, man.
[00:33:48] But, ma'am, like, coding is not, I know integrations, all those things, ma'am.
[00:33:55] Like, I am currently learning the coding part, like collections and the querying and complex field types.
[00:34:03] All those things I am currently learning in MongoDB.
[00:34:06] Whereas coming to SQL, I have already learned all those things.
[00:34:14] So how do you insert or maybe verify a user if you don't know the query?
[00:34:25] Like, I have used A for the project.
[00:34:32] I'm sorry.
[00:34:34] Do you maybe know aggregation pipelines by any chance in MongoDB?
[00:34:39] Yes, ma'am.
[00:34:40] Aggregation, like group by those things.
[00:34:45] But group by does not exist in MongoDB.
[00:34:48] It does, but...
[00:34:50] But the keyword is not group by.
[00:34:57] No, I've sent a DSA.
[00:35:00] question in the chat box.
[00:35:07] No, it's on the right.
[00:35:08] You need to close this small tab.
[00:35:11] Yeah.
[00:35:20] I need you to go through the question, the problem statement and understand it and then explain it to us what you understand about it.
[00:36:35] Yes, ma'am.
[00:36:35] I have understood the problem statement.
[00:36:38] Can I explain it?
[00:36:40] Yeah, please.
[00:36:41] As they have given the recipe, ingredients and the supplies, ma'am.
[00:36:45] Recipe is the thing we are going to make and the ingredients are the things which we need to complete the recipe and the supplies are the stock.
[00:36:55] Current at current we have right okay the recipes here like bread and the ingredients are eastern flow so
[00:37:06] when coming to the supplies whether the supplies contain eastern flow we have to check if the eastern flow flow are there then we can make the bread
[00:37:16] Well, coming to the second example, when the bread was like eastern floor is used to make the bread and we got the bread.
[00:37:24] But to make the sandwich, we need ingredients like bread and sandwich.
[00:37:30] So, the...
[00:37:34] We got the product from Eastern Floor Grid and we combine it with meat to get the sandwich.
[00:37:39] Okay.
[00:37:41] So what is expected?
[00:37:42] What is the output that you need to return?
[00:37:47] The output is whether the recipe will be prepared using the supplies or not.
[00:37:53] Are you sure that is the output required?
[00:38:01] Here, the output is like the bit will be created using means like, okay.
[00:38:09] The bread is the recipe and the ingredients given are available.
[00:38:14] Here we are showing we can create bread since we have the ingredients, yeast and flour.
[00:38:18] Like the ingredients are available, so we can create the bread.
[00:38:22] That is the output.
[00:38:24] Now, what would be the format of your output?
[00:38:28] What you would be exactly returning in it?
[00:38:33] Okay, okay.
[00:38:37] I'm talking about the explanation.
[00:38:41] Like, what are the recipes which we can make are the output method.
[00:38:46] Yeah, got it.
[00:38:48] Can you think of an approach to solve this?
[00:38:54] We can compare the ingredients with the supplies by using
[00:39:03] The two includes, we can.
[00:39:11] For single iteration, it will be easier.
[00:39:14] While coming to the second example, we have to iterate two times.
[00:39:21] While coming to the third time,
[00:39:26] No, but as per my understanding of iterative, it means you go from the first element till the last element.
[00:39:35] Esper.
[00:39:38] We compare the east element whether the east is in the supplies or not and we check whether the floor is in the supplies or not.
[00:39:45] When the both are there, we get bread.
[00:39:48] But means we got the bread, we have to enter the bread into a new array and we have to compare like the bread again with the like for the second example, we can compare the bread again.
[00:40:00] with supplies in second sandwich bread and meat so that we can say bread and sandwich can be made okay so do you think you have an approach in mind or you need some time to think of it
[00:40:17] I will try.
[00:40:19] Okay.
[00:40:19] You can, if you do not have a solid approach as of now, you can take a few minutes, think of it.
[00:41:43] I will try the previous approach itself.
[00:41:46] Okay.
[00:42:01] Do you code in Python?
[00:42:02] Because any language is fine, whatever you code in.
[00:42:08] For DSA, I am learning in C++.
[00:42:11] For OOPG, it means OOPS concept I have learned in Java.
[00:42:14] See, you can just use any language of your choice.
[00:42:17] We have no restrictions at all.
[00:42:20] Whatever you are most comfortable in.
[00:43:34] C'est bon, c'est bon.
[00:43:44] I suppose so.
[00:50:18] What happened?
[00:50:20] Nothing.
[00:50:23] It's like that approach is not possible.
[00:50:29] Okay.
[00:50:29] Can you explain why is it not possible?
[00:50:33] I'm like,
[00:50:36] Previously I have said the bread, we have to compare the ingredients with supplies.
[00:50:43] Whenever for single application means like single recipe, it will be okay, but the recipes are increasing.
[00:50:51] So we have to do for each recipe and we have to compare the ingredients with supplies and we should store the details in another array like.
[00:51:04] Another vector to know whether the supply means the
[00:51:11] ingredients needed for the recipe are available in the supplies and it was possible for a single element but while coming to the two elements it will be
[00:51:23] Not possible in my approach.
[00:51:26] Okay.
[00:51:26] Can you walk me through for a second?
[00:51:30] single recipe please.
[00:51:32] Yes.
[00:53:33] No, what are you doing?
[00:53:35] I mean...
[00:53:38] And why would it run?
[00:53:41] It is asking login sign up.
[00:53:43] That's okay.
[00:53:44] Can you explain how it will work?
[00:53:48] Forget it.
[00:53:49] Yes.
[00:53:50] Like for the single element like bread, I am using the size of 5.
[00:53:57] The i size is 0 means like 1 no 1 means 0 only so it will iterate one time only while coming to the ingredients the ingredients are having 2
[00:54:14] in is equal to it will be recorded as 1 but it means the ratios
[00:54:24] Now the ingredients will be taken as size 2 and it will be iterating 2 times.
[00:54:28] So for the first time it will be comparing 0, 1.
[00:54:32] 0, 1 with the supplies.
[00:54:33] Supplies are 0, 1, 2, 3.
[00:54:36] Like whenever the east is compared with east, the count will be increased by 1.
[00:54:41] Okay.
[00:54:41] Again, whenever the floor is compared with floor, the count will be increased by 2.
[00:54:46] Means the ingredients are required are 2.
[00:54:49] So whenever the count is greater than or equal to 2, then I can return the recipe as it was a it can be made.
[00:55:00] No, wait.
[00:55:02] How did you decide that the count should be?
[00:55:05] What did you do?
[00:55:07] I have used it for count.
[00:55:08] I have used the ingredients.
[00:55:10] It was outside all the loops, no?
[00:55:15] So you're saying you iterated over recipes.
[00:55:19] And you went to iterate over its ingredients.
[00:55:23] Yes, ma'am.
[00:55:25] What is the loop with variable k doing?
[00:55:29] K is looping with the supplies, ma'am.
[00:55:33] Okay.
[00:55:34] So you...
[00:55:37] Yes, ma'am.
[00:55:37] I am comparing the ingredient each with every element in the supplies, ma'am.
[00:55:43] And you are saying you would increase the count.
[00:55:45] And if your count is...
[00:55:48] Greater than equal to ingredient.
[00:55:51] Ingredient size.
[00:55:56] It was only possible for this test case only, ma'am.
[00:55:59] Like, if there were like, each is two times in the supplies, then it will be not possible.
[00:56:06] Like, the each is two times in the supplies.
[00:56:09] I'm sorry.
[00:56:11] Can you explain me in what particular case would the value of ingredients ever be greater than count?
[00:56:21] I'm like whenever here the two elements are like east and flow whenever east is repeated two times in the supplies
[00:56:30] or then the count will be more than the ingredients but whenever there is no flow in sir but east is repeated two times
[00:56:40] The count will increase, but the output should not be bread.
[00:56:43] It should be null, but it will give the output as null.
[00:56:47] It was a constraint for this code.
[00:56:51] Okay.
[00:56:52] Can you, could you might have used a Boolean flag instead of the count?
[00:57:00] To make sure whether you have all the ingredients in supply or not for any particular recipe.
[00:57:08] Yes, ma'am.
[00:57:08] Like we can determine like we can create a new actor using Boolean and whenever the yeast means ingredient yeast is matching with supplies, we can
[00:57:22] vector we can change the zero means at the zero index we can make it into true and whenever the floor is
[00:57:33] matched with the supplies it will again the index one will be true when both are true only we can return the result we can use like that okay
[00:57:43] Instead of a vector of booleans that you're saying, you can actually do it with a single boolean flag.
[00:57:51] Can you think how?
[00:58:48] While using the Boolean, like we can initialize the Boolean as false first.
[00:58:56] And whenever we are comparing the east and floor, whenever the both are compared, we can make the Boolean as true map.
[00:59:06] So you're saying you will initialize as false?
[00:59:09] Yes, ma'am.
[00:59:09] So I come and I compare yeast with yeast.
[00:59:13] So it gets true.
[00:59:15] Now what happens if floor is not there?
[00:59:18] We should compare means like both yeast and floor should be there only.
[00:59:24] We should make it into true, ma'am.
[00:59:26] Can you maybe change your if condition slightly for that?
[00:59:31] Fire, fire.
[01:00:52] Normally I wanted to make like 0,1 so I can make it into 1,0 and compare the both eastern floor at the same time but SFK is not possible.
[01:01:09] Now, why did you add this condition after and?
[01:01:13] I wanted to compare like if it is 0,1, it will be 1,0 like 0, east and floor we can 0,1.
[01:01:24] No, but you are writing a code.
[01:01:26] It cannot be for a particular example.
[01:02:22] Our time is up.
[01:02:23] Yes.
[01:02:25] Thanks for joining.
[01:02:27] Can I know the approach, ma'am?
[01:02:32] For this one?
[01:02:33] Yes, ma'am.
[01:02:36] The one that you're trying is a brute force one.
[01:02:39] Yes, ma'am.
[01:02:40] And this would be a very messy approach.
[01:02:44] I asked you to change it to a Boolean flag.
[01:02:47] Yes, ma'am.
[01:02:48] And if you did that, you could have just changed your if condition with a not one.
[01:02:53] If they do not match, you make the Boolean false.
[01:02:57] So you would immediately know you cannot make this particular recipe.
[01:03:02] Okay.
[01:03:05] But in that condition, when we compare flour with corn, it will be changed into false only.
[01:03:16] Why would you be comparing if you found it for like if you already found a particular element inside your supplies?
[01:03:25] Why would you continue the loop?
[01:03:27] You would just simply exit the loop, right?
[01:03:34] Thanks for joining.
[01:03:35] That's been great.
[01:03:38] Can I leave, man?
[01:03:38] Yeah, you're sure.
[01:03:51] आपका क्या opinion है इसके बारे में?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment