Algorithms

7 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€65.30
List Price:  €93.30
You save:  €27.99
£55.85
List Price:  £79.79
You save:  £23.94
CA$95.55
List Price:  CA$136.51
You save:  CA$40.95
A$106.62
List Price:  A$152.32
You save:  A$45.70
S$95.18
List Price:  S$135.97
You save:  S$40.79
HK$547.80
List Price:  HK$782.61
You save:  HK$234.80
CHF 63.79
List Price:  CHF 91.14
You save:  CHF 27.34
NOK kr769.72
List Price:  NOK kr1,099.65
You save:  NOK kr329.92
DKK kr487.07
List Price:  DKK kr695.84
You save:  DKK kr208.77
NZ$117.16
List Price:  NZ$167.38
You save:  NZ$50.21
د.إ257.06
List Price:  د.إ367.24
You save:  د.إ110.18
৳7,690.80
List Price:  ৳10,987.33
You save:  ৳3,296.53
₹5,841.61
List Price:  ₹8,345.51
You save:  ₹2,503.90
RM333.81
List Price:  RM476.90
You save:  RM143.08
₦92,745.84
List Price:  ₦132,499.74
You save:  ₦39,753.90
₨19,508.81
List Price:  ₨27,870.93
You save:  ₨8,362.11
฿2,590.69
List Price:  ฿3,701.15
You save:  ฿1,110.45
₺2,265.11
List Price:  ₺3,236.01
You save:  ₺970.90
B$358.13
List Price:  B$511.64
You save:  B$153.51
R1,311.83
List Price:  R1,874.13
You save:  R562.29
Лв127.74
List Price:  Лв182.50
You save:  Лв54.75
₩96,362.95
List Price:  ₩137,667.26
You save:  ₩41,304.30
₪263.40
List Price:  ₪376.30
You save:  ₪112.90
₱4,038.52
List Price:  ₱5,769.57
You save:  ₱1,731.04
¥10,910.67
List Price:  ¥15,587.34
You save:  ¥4,676.67
MX$1,198.75
List Price:  MX$1,712.57
You save:  MX$513.82
QR255.51
List Price:  QR365.03
You save:  QR109.52
P964.58
List Price:  P1,378.03
You save:  P413.45
KSh9,448.65
List Price:  KSh13,498.65
You save:  KSh4,050
E£3,349.02
List Price:  E£4,784.52
You save:  E£1,435.50
ብር4,021.76
List Price:  ብር5,745.61
You save:  ብር1,723.85
Kz58,375.85
List Price:  Kz83,397.65
You save:  Kz25,021.80
CLP$66,547.19
List Price:  CLP$95,071.49
You save:  CLP$28,524.30
CN¥506.87
List Price:  CN¥724.13
You save:  CN¥217.26
RD$4,108.14
List Price:  RD$5,869.02
You save:  RD$1,760.88
DA9,408.68
List Price:  DA13,441.55
You save:  DA4,032.87
FJ$157.85
List Price:  FJ$225.51
You save:  FJ$67.66
Q545.03
List Price:  Q778.65
You save:  Q233.61
GY$14,660.48
List Price:  GY$20,944.44
You save:  GY$6,283.96
ISK kr9,815.39
List Price:  ISK kr14,022.59
You save:  ISK kr4,207.20
DH707.84
List Price:  DH1,011.24
You save:  DH303.40
L1,238.76
List Price:  L1,769.74
You save:  L530.97
ден4,020.67
List Price:  ден5,744.06
You save:  ден1,723.39
MOP$565.05
List Price:  MOP$807.26
You save:  MOP$242.20
N$1,322.15
List Price:  N$1,888.87
You save:  N$566.71
C$2,578.94
List Price:  C$3,684.35
You save:  C$1,105.41
रु9,342.64
List Price:  रु13,347.21
You save:  रु4,004.56
S/263.24
List Price:  S/376.08
You save:  S/112.83
K270.50
List Price:  K386.44
You save:  K115.94
SAR262.50
List Price:  SAR375.02
You save:  SAR112.51
ZK1,856.98
List Price:  ZK2,652.95
You save:  ZK795.96
L324.92
List Price:  L464.20
You save:  L139.27
Kč1,643.69
List Price:  Kč2,348.23
You save:  Kč704.54
Ft25,598.69
List Price:  Ft36,571.12
You save:  Ft10,972.43
SEK kr764.15
List Price:  SEK kr1,091.69
You save:  SEK kr327.54
ARS$61,224.11
List Price:  ARS$87,466.76
You save:  ARS$26,242.65
Bs485.98
List Price:  Bs694.29
You save:  Bs208.30
COP$277,111.33
List Price:  COP$395,890.30
You save:  COP$118,778.96
₡35,607.40
List Price:  ₡50,869.89
You save:  ₡15,262.49
L1,730.46
List Price:  L2,472.19
You save:  L741.73
₲521,774.38
List Price:  ₲745,423.92
You save:  ₲223,649.54
$U2,704.33
List Price:  $U3,863.50
You save:  $U1,159.16
zł282.40
List Price:  zł403.45
You save:  zł121.04
Already have an account? Log In

Transcript

Algorithm questions. These come up a lot. I know they're not your most favorite question. Some people they are some people will valance. But even if you don't, you have to know how to code algorithms during a coding interview because they come up so often. So make sure you study your algorithms, and learn a lot of basic algorithms.

Go take coding challenges online. There's many of these places and push yourself push yourself in the boundaries of what you don't know and things you thought you already knew and you need to refresh on. Make sure you know how things like lists and trees and tries and rate axes work. Make sure you know how to search make sure you know how to sort know the basics of all these algorithms, so that you can use them effectively in an interview. Keep in mind that most algorithms can be reduced from existing algorithms, or by applying those algorithms in practice the types of new questions you're getting are going to be geared around this, they're not going to be based on totally unique knowledge. They're going to be based on knowledge of algorithms that you should already know, at least in the interviewers mind.

Refresh yourself on some of the basic approaches to how we're going to solve things such as dynamic programming, how you reduce one form to another is splitting up into smaller ones divide and conquer. There are numerous ways that you can approach them and they're generic, instead of just knowing outcomes, know how you actually solve a new algorithm problems and how you reduce them to existing ones. For every algorithm you write while practicing state, it's big O complexity in both time and space. You need this knowledge because it's going to be asked, somebody is going to ask you, okay, what's the time complexity algorithm? They're probably just going to say complexity or they're probably just going to say big O generally, I think You can get away with big time complexity. But you should know at least the differences between time space complexity.

And you should be able to state all the comic books. And you should know what linear time is what logarithmic time is and what exponential time is, is going to come up. Your best practice is just as you're writing our rhythms for the interview practice, just state them, come up with them and see if it is okay. Don't jump in and give an optimal solution. Start with a basic solution. Show that you've understood the problem and that you can solve it in the most straightforward way.

Sometimes candidates fail to produce any code because they're so worried about whether solutions efficient, they don't even come up with that basic code. But that's the place you want to start. You want to come up with the basic code showing you to do it, it may be horribly inefficient. Maybe it's an exponential algorithm. It's some brute force approach that solves a problem but as long as you get solved, it least you can demonstrate some problem solving ability. And your ability to work through algorithms.

From there, you can ask the interviewer, should you optimize this? Or they may have asked you already, well, what is an optimal form of this? Maybe they came up with an complexity and said, You know, this looks very inefficient. Tell me what it is, you're going to say what capacity is and and say, is there a better solution? Now's the time to actually work through that better solution, discuss it first. Not all interviewers are going to expect you to actually write down a new solution.

Sometimes the optimal solution is extremely complex, and there's no way you can solve it within the framework conditions you, but you can definitely talk about it. You can talk about how you'd solve it. And that may be enough for the interviewer. Even if they want you to code it, talking about it first, less than give you feedback to tell you for them to tell you how you might improve it lets you work through your mind because the optimal forms are often not straightforward. You want to have a clear picture of how it's done first. So ask whether they have issues and talk through it and then coded if necessary.

You're going to get stuck. It happens. It happens to all of us and happens to me, I sit in front of the whiteboard, and suddenly I'm like, I have no idea what I'm supposed to be doing now. I don't know how to move forward this problem. It's okay to get stuck. What you need to learn is how do you get unstuck?

What are the techniques for that? The first one is start drawing a diagram. start drawing little boxes, lines or whatever that helps you visualize the problem. This can often jog the memory into thinking about something new to sort of say, hey, look, I saw it a different way. Talk about what you're thinking. Don't stand there in silence.

Say what are your thinking? What are your what is actually blocking you let the interviewer understand where you are, and give them a chance to respond. pause between sentences, look at them, engage them, let them give you some tips and help and help you move along. If you're totally be stuck. Just ask them, ask them for specific aviation. I'm not sure how to do this or just admit that you don't know how to do and say, Look, I'm stuck.

And I don't know how to get into an interactive process and they can may help you get unstuck. You can solve a simpler problem. Maybe there's something in the album that's a little bit too complex. But you know, something that's slightly simpler, maybe if you're one of the requirements, can you solve that problem? You can solve that problem and then say, Well, this is the basic one. And now I had to figure out how to work in this advanced requirement that shows a decent level problem solving and may also lead you to the solution that unique attempt to pattern that seems to fit.

Perhaps you're not sure how the pattern is going to solve it. But you've seen it before. And you've seen it solve this type of problem before. So you know that search is useful here. Maybe you know that you have the storage. And you can just try and put these items together and see if a solution comes out of it.

Again, it's not perfectly elegant, but if you're stuck, it's better than standing there. Doing nothing you need to show the interview, that you can continually think that you're capable problem solving, you're going to keep performing in situations where you're not sure what you're doing. You may be reluctant to practice interviews because you don't think it's relevant to your work. And I kind of speak negatively towards them in interview situations. And I'm going to state one thing very clear. This is completely irrelevant.

Whether you need them in your day to day work or not, because they come up in the interview, it's something you actually have to be able to do to pass that interview process. If you don't know it, another candidate will, and that's going to give them the advantage over you. It's also not like it's wasted knowledge, though you may not use it in your day to day career. Lots of people do these algorithms do come up quite often a lot of people are in a position of doing algorithm development. So it's not like it's a completely foreign concept to programming. It is something programming should be able to do and therefore it's fair to come up with an interview.

So your opinion and whether it's relevant or not, doesn't matter here you have to learn this if you want to pass interviews with companies that give algorithm questions. Our this pose a particular challenge during coding interviews, you need to know how to work with algorithms derive them. You have to understand this as an interactive session. Don't jump into optimal solutions. Make sure you engage the interviewer. Make sure you let them help you when you're stuck.

And make sure it's a two way process when you're coming up with this interview, be confident talking about complexity, and be familiar with a lot of algorithms. You have to know algorithms to pass some coding interviews.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.