The nullish coalescing operator (
??) is a logical operator that returns its right-hand side operand when its left-hand side operand is
Just like any other skills, the coding interview is one area where you can greatly improve with deliberate practice. So here’s what I started off with. I have solved five problems on arrays and have given out my code and output. There are more ways of solving these problems. This is how I solved mine.
1) Remove Duplicates from Sorted Array
Given a sorted array nums, remove the duplicates in-place such that each element appears only once and returns the new length.
Do not allocate extra space for another array, you must do this by modifying the input array in-place…
Coding is similar to writing prose. Every individual does it a little differently, and as a result, when our code is read, we all have a distinct voice. Different naming conventions and problem-solving logic exist in all of us. We all think our code makes sense — particularly if it works — but it’s possible that it doesn’t to someone else. To combat this, we all need to get better at code commenting. That way, whoever comes next to the project will have a clear path to understanding and improving/fixing our code.
To begin with, let’s make sure that we’re…
toString() : returns a number as a string.
In Java, string is basically an object that represents sequence of char values. An array of characters works same as Java string. I have solved five problems on strings and have given out my code and output. There are more ways of solving these problems. This is how I solved mine.
Write a function that reverses a string. The input string is given as an array of characters
Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
You may assume all the characters consist of printable…
For a long time, asynchronous, event-driven callbacks were an unavoidable part of JS development.
GitHub recently released a feature that allows users to create a profile-level README to display prominently on their GitHub profile. The GitHub profile-level README feature allows more content than the profile bio, supports markdown which means you can play around with the content more visually (Did someone say GIFs!?) and the README is significantly more visible as it is placed above the pinned repositories and takes up as much space above the fold of the webpage as you like.
The profile README is created by creating a new repository that’s the same name as your username. For example, my GitHub…
Yesterday I had the pleasure of speaking at the “Technica 2020 Hackathon” by Machine Learning at IIT about Git workflow. It’s time we revisited Git and how important it is to master in order to advance in our careers. Mastering Git will make a huge difference in how you manage code and your own day-to-day workflow. So, here I come with a few things that I know about when using ‘GitHub’.
As you already know, a version control system like Git tracks the history of changes as people and teams collaborate on projects together. As the project evolves, teams can…
Software Developer in Chicago