Posts

Showing posts from 2021

Install Node and NPM via Node Version Manager (NVM)

Image
Node Version Manager (NVM) is one of the most important package for software developers while working with node.js specially. While working with node.js mostly we work upon multiple projects and those projects could be on different-different versions of node.js, So for maintaining multiple versions of node.js in your system it is required. Node.js via NVM Step 1 : Go to this official Github repo  https://github.com/nvm-sh/nvm . Step 2 : You can find below commands in above Step 1 link, install NVM in your system with any command. Step 3 : Now QUIT your terminal and open it again and check now ~ nvm -v . Step 4 : Now install node.js via command ~ nvm install node . Now you can see npm -v also works. Step 5 : Check which version is installed via ~ node -v OR ~ nvm ls-remote . Step 6 : Install specific version of node via ~ nvm install versionNumber . Step 7 : Use your desired node version via ~ nvm use versionNumber . Step 8 : Set default version via ~ nvm alias default versionNumbe...

DSA Questions As Per Interview Prep SE

Let's see some of the Important Basic to Advanced Questions Regarding Data Structure & Algorithm Array Questions 1. Given a square matrix (2D array), calculate the sum of the primary diagonal and the secondary diagonal.      [[1, 2, 3], [4, 5, 6], [9, 8, 9]]     Primary Diagonal: 1 + 5 + 9 = 15 Secondary Diagonal: 3 + 5 + 7 = 15 2. Find out the duplicate elements from array.      const numArr = [1, 2, 1, 3, 2, 1, 2, 3, 4, 5]     const strArr = "data structure and algorithm discussion" 3.  The Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones, starting from 0 and 1. Write the program for it      Example: 0,1,1,2,3,5,8,13,21,34,55,…     Time complexity should be O(n)      Formula: F(n)=F(n−1)+F(n−2) 4. Flatten the below given array without using array.flat() method.      [1, [2, 3], [4, 5, 6, [7, 8]]]     Output sho...

VS Code Must Have Extensions

Image
VS Code Must Extensions For Developers/Programmers Below are the extensions which you should installed: Git-Lens Prettier Python Text Transformer AWS Toolkit Read-me Preview Material Icon Theme <> Happy Coding  </> 💻

How to Use VIM Editor in CLI

Image
VIM is most popular editor which Developer's generally require to use while Development, Let's see how we can use it: VIM Editor - Education Funda Open a File: ~ vim fileName.ext  To save and exit the Vim editor, you can use the following commands: :wq  This command saves the changes to the file and exits Vim. It is equivalent to “write and quit”. :w : This command saves the changes to the file, but remains in Vim. You can continue editing or use other commands to manipulate the file. :q! : This command exits Vim without saving changes. It is equivalent to “quit bang” and discards any unsaved modifications. Additional Tips To enter command mode, press the Esc key. To switch between insert mode and command mode, use Esc to exit insert mode and return to command mode. Save and exit a file: :wq Save a file without exiting: :w Exit Vim without saving changes: :q! Rename a file and save changes: :w new_filename.txt Save and exit multiple files: :wqa Remember to use these commands...