I think this solution may break down in the list section if the elements within the list are dicts? Need to test it though to be sure.
@thndesmondsaid9 күн бұрын
Thank you (!!)
@jeevankishorem765026 күн бұрын
Beautiful and simple explaination. I subscribed the channel for its similicity.
@user-jk8sq5qs2iАй бұрын
How will the search service filter out properties that are not available (that data is in the Booking MySql)?
@imcabezasАй бұрын
Thanks for sharing! The recursive implementation is indeed simple and useful.
@8888vampire8888Ай бұрын
did we forget an arrow, for feeding information, from the S3 cluster to the Queuing service? How will a new client, that just logged in, will get the actual modified chunk locally on his machine?
@JaredFL2 ай бұрын
are you in the data structures dungeon?
@alfredoferreira78822 ай бұрын
You did a great job explaining it, you got a new subscriber
@sehajsingla30292 ай бұрын
On what platform do you make your presentations?
@Feedv62 ай бұрын
You're my saviur 🙏
@veethamershiya53153 ай бұрын
👍
@stevegonzales44113 ай бұрын
Data Engineering problems please. This is an ANTI PATTERN in Big Data. If you employed this to find a difference, your batch would take days or weeks. Data Engineering problems please.
@davidjones53193 ай бұрын
Well done! thank you
@user-qz3xt6ko5c3 ай бұрын
it will better work if you put in left = -1 and right = array.lenght in the begin))))
@ib65484 ай бұрын
Thank you for your detailed explanations and helpful tutorials. I truly appreciate your efforts. The animations in your tutorials are especially beneficial for visual learners like myself. Could you please share: 1. The application you use for writing over VSCode? 2. The software you use to create the illustrations of the linked list? 3. How you split the screen to show both VSCode and the illustrations simultaneously? Thank you once again!
@mohammedfaseeullah60954 ай бұрын
why youTube take too much months to recommend this playlist
@samuelboatengtakyi70704 ай бұрын
You are the best, Liz! Thank you!!!
@kebab46404 ай бұрын
2:00 I like what she said about imperfectionism. She seems wise, I like her.
@balamuruganvms51585 ай бұрын
Awesome explanations
@Sionnachsalach5 ай бұрын
Thank you for a really thorough explanation of the algorithm, as well as the brute force option. I found it really helpful.
@alexenrique94585 ай бұрын
for idx, num in enumerate(set(lst),1): if idx != num: return ind
@sergiom22075 ай бұрын
thats only if the list starts with 1, in case it doesnt you can get a min value using min() and start counting from there. still very nice
@kevint35225 ай бұрын
Great video. Subbed and liked. All my CS classes have me coding C and C++. So far I'm able to understand your coding example. What I'm really after is help writing a recursive function to find unique combinations of K elements from a list of N elements. I have to write it in C and then translate to x86 assembler. Do you know where I can find some good information on how to write a recursive algorithm for this in C. The ChatGBT solution wraps recursion in a for loop. I would love a walk-through of what's happening on the stack.
@m.e.k17415 ай бұрын
Here is the code that will work on all data structures def run_on_dict(data): for key, value in data.items(): if isinstance(value, dict): run_on_dict(value) elif isinstance(value, list): for element in value: if isinstance(element, (dict, list)): run_on_dict(element) else: print(f"{key}: {element}") else: print(f"{key}: {value}")
@christianejikeomeje31456 ай бұрын
Hello Elizabeth your tutorial on algorithm and data structure is the best, afte watching through your videos I can now understand data structure and have built confidence to go into code challenge
@christianejikeomeje31456 ай бұрын
Lukas is a Civil Engineer who loves designing road networks to connect cities numbered from to . He can build any number of bidirectional roads as long as the resultant network satisfies these constraints: It must be possible to reach any city from any other city by traveling along the network of roads. No two roads can directly connect the same two cities. A road cannot directly connect a city to itself. In other words, the roads and cities must form a simple connected labeled graph. You must answer queries, where each query consists of some denoting the number of cities Lukas wants to design a bidirectional network of roads for. For each query, find and print the number of ways he can build roads connecting cities on a new line; as the number of ways can be quite large, print it modulo . Input Format The first line contains an integer, , denoting the number of queries. Each of the subsequent lines contains an integer denoting the value of for a query. Constraints Output Format For each of the queries, print the number of ways Lukas can build a network of bidirectional roads connecting cities, modulo , on a new line. Sample Input 0 3 1 3 10 Sample Output 0 1 4 201986643 Explanation 0 We answer the first two queries like this: When , the only option satisfying Lukas' three constraints is to not build any roads at all. Thus, we print the result of on a new line. When , there are four ways for Lukas to build roads that satisfy his three constraints: Thus, we print the result of on a new line. Submissions: 96 Max Score: 90 Difficulty: Expert Rate This Challenge: More How best can this question be solved
@billyfigueroa16176 ай бұрын
I was able to solve this problem by just taking a copy of the original array and sorting it and then using a for loop to check how many elements have shifted function (arr) { let diffLen = 0; const sortedCopy = […arr].sort((a, b) => a - b); for (let i = 0; i < arr.length; i++) { if (arr[i] !== sortedCopy[i]) { diffLen++ } return diffLen; } Would this not be allowed? Seems simpler. I m starting to recognize patterns a little more and more and was able to see that you can just compare to the sorted version and count the number of diffs thanks to watching videos like yours with the other pointer and sliding window techniques
@-anonim-30086 ай бұрын
Thanks a lot! It's really a great idea!)
@djneils1006 ай бұрын
great video - thanks
@birodhlungeli51996 ай бұрын
you are my virtual teacher.,.. keep uploading content.. ❤❤
@kavittta6 ай бұрын
for i in range(min(list), max(list)): if i not in list: print(i)
@mohaymenaljali57865 ай бұрын
This has higher complexity, o(n^2) I think
@rishisimply6 ай бұрын
This was immensely useful. Good that you took ideas from Stanford presentation.
@cstlabs17726 ай бұрын
That time complexity is wrong. It is exponential not linear
@jimshtepa54236 ай бұрын
this is very sad it has only less than hundred views. very good materials, thank you
@madilinkenmeyer6 ай бұрын
Your dog is in the back like "This again? Great."
@jimshtepa54236 ай бұрын
Did you end up joining fb?
@yt-sh6 ай бұрын
Thanks for these coding challenge series, do upload more of these...
@mazthespaz17 ай бұрын
for those who want to try the problem without dynamic arrays there are a couple other ways here is one i tossed together using masks. no sorting or juggling data, i did the code in JS but easily ported to other languages. it is fun to think of multiple solutions when on the job, and compare costs of each method. note i got lazy with my camel casing. i didn't do strenuous testing so somebody let me know if i messed up // randomly chose longest meeting 10hours with more masks you can do longer meetings const lengthMask = [0,0b1,0b11,0b111,0b1111,0b11111,0b111111,0b1111111,0b11111111,0b111111111,0b1111111111]; // use bits to mask out 1 hour blocks for meetings // if half hour blocks are desired, the max time the business could be open in a day is 16 hours for a 32bit mask // in other languages, we could use 64 or 128 bit integer masks // // input: array of pairs of start, end times of meetings already scheduled // returns: a bitmask where a '1' means a 1 hour block when a meeting is in progress // function createMeetingsMask( meetings ) { const l = meetings.length; let companyMask = 0; for( let i = 0; i < l; i += 2 ) { let startTime = meetings[i]; let endTime = meetings[i+1]; let mask = lengthMask[endTime-startTime] << startTime; companyMask |= mask; } return companyMask; } // if there are multiple open blocks of time of same length, we could return an array of pairs // right now we just return starting time and length of one of the largest free blocks function longestFree( meetingsMask ) { let longest = 0; let longeststart = 0; let curlen = 0; let curstart = 0; for( let i = 0; i < 24; i++ ) { if( meetingsMask & 1 ) { if( curlen > longest ) { longest = curlen; longeststart = curstart; } curlen = 0; } else { if( curlen == 0 ) curstart = i; curlen++; } meetingsMask >>>= 1; } return[longeststart, longest]; } // (0, 6) and (17, 23) are when biz is closed // array of all meetings' start and end times // doesn't matter how array is put together, does not need to be sorted const testMeetingData = [0,6,17,23,9,11,12,14,13,17]; let freeMask = createMeetingsMask( testMeetingData ); let longeststart = -1; let longesttime = -1; [longeststart, longesttime] = longestFree( freeMask ); console.log( longeststart + ' ' + longesttime );
@angelcoronado35387 ай бұрын
Thank you! It's a good explanation :)
@vickydas64807 ай бұрын
East Or West Liz is the Best.... Thank you for such clearly explained Graph Series.
@itstaw7 ай бұрын
Thank you for the great explanation! Concise and easy to follow!
@ahmedbaig85437 ай бұрын
Very Well Explained i like your teaching way and Content very Helpful Thank you so much
@_jatin_mittal7 ай бұрын
amazing video! 😇
@jeremylautman7 ай бұрын
I didn't initially recognize this problem as a two pointer problem. My first thought was sliding window. Can you expand on how you chose that tool from looking at the problem? Also, I'm surprised that you didn't get array out of bounds issues for [1,2,3] (and [4,3,2,1]). For [1,2,3], when leftPointer increments to 2, the next conditional evaluation should have read arr[3] before checking leftPointer < arr.length - 1.
@bflitt49197 ай бұрын
So helpful!
@VishalSharma-rn7mt7 ай бұрын
Awesome
@drewrodrigues8 ай бұрын
I'm not understanding why at @26:24, the time complexity is `O(logn)`. He mentions it's because of the height of the tree, but there's still more than `O(n)` nodes (recursive calls) in the tree. I was thinking the time complexity (without the n operations at each node), would be `O(2^n)`... For each call, we end up with 2 more calls. Any help here would be awesome!
@drewrodrigues8 ай бұрын
Also, then at @36:53, he mentions the time complexity is `O(2^n)` because we're making 2 recursive calls in each call. This is the same thing we're doing at @26:24... Hmm.
@rosebeats098 ай бұрын
great video, Liz!
@yuhengcai56008 ай бұрын
why do we need a block service to chunk file when there is already a chunker in client side?