Open in app

Sign In

Write

Sign In

Sonika | @Walmart | Senior Developer | 10 Year+Exp
Sonika | @Walmart | Senior Developer | 10 Year+Exp

506 Followers

Home

About

Published in

Level Up Coding

·Pinned

Javascript | Design a webpage which can auto load new posts when you reach the bottom of the page by using JavaScript | Infinite Scrolling | Interview Preparation

You may use AJAX and JavaScript event listeners. 1] HTML Structure: Create an HTML structure that includes a container for displaying posts and a loader element that will appear when new posts are being loaded. // Add div for posts-container <div id="posts-container"></div> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta…

JavaScript

3 min read

JavaScript

3 min read


Published in

Level Up Coding

·Pinned

React | Design Tic Tac Toe Game | Interview Preparation

Let’ go step by step, 1] Create Board — 3*3 const [board, setBoard] = useState(Array(9).fill(null)); 2] Create state to maintain who is the nextPlayer, const [isXNext, setIsXNext] = useState(true); 2] Loop the board which create each cell <div className="board"> {board.map((cell, index) => ( <div key={index} className="cell" onClick={() => handleClick(index)}> {cell} </div> ))} </div>

React

4 min read

React | Design Tic Tac Toe Game | Interview Preparation
React | Design Tic Tac Toe Game | Interview Preparation
React

4 min read


Published in

Level Up Coding

·Pinned

All about Javascript Promises for Interviews

JavaScript | Promise Polyfills | Output Driven Questions | All About Promises — Promises return a value which is either a resolved value or a reason why it’s rejected. A Promise has four states Pending: Before the event has happened, the promise is in the pending state. Settled: Once the event has happened it is then in the settled state. Fulfilled: Action related to the promise has succeeded. …

JavaScript

8 min read

All about Javascript Promises for Interviews
All about Javascript Promises for Interviews
JavaScript

8 min read


Pinned

JS | Auto-complete feature using Trie | Search Suggestions System | Coding Round Interview Question

Given an array of strings products and a string searchWord. We want to design a system that suggests at most three product names from products after each character of searchWord is typed. Suggested products should have common prefix with the searchWord. …

2 min read

new* | JS | Search Suggestions System | | Auto-complete feature using Trie | Coding Roun
new* | JS | Search Suggestions System | | Auto-complete feature using Trie | Coding Roun

2 min read


Published in

TheLeanProgrammer

·Pinned

Solution To The Browser Inconsistency Problem

Normalize CSS approach or the CSS Reset Approach — As a rule, we want an HTML element to look the same way, independent of which browser is being used to view it. Unfortunately, this is not the case because of the way browsers run. CSS Resets A CSS resets aims to remove all built-in browser styling. …

CSS

3 min read

An attempt to solve the browser inconsistency problem
An attempt to solve the browser inconsistency problem
CSS

3 min read


Published in

Level Up Coding

·6 days ago

DP on Stocks| Buy and Sell Stocks | Recursive | Memoization | Top Down

Similar Problems: Best Time to Buy and Sell Stock (only 1 transaction of Buy and Sell) Best Time to Buy and Sell Stock II (as many transaction you can make to Buy and Sell) Best Time to Buy and Sell Stock III (atmost 2 transaction to Buy and Sell) Best…

JavaScript

12 min read

DP on Stocks| Buy and Sell Stocks | Recursive | Memoization | Top Down
DP on Stocks| Buy and Sell Stocks | Recursive | Memoization | Top Down
JavaScript

12 min read


Published in

Level Up Coding

·Sep 18

Javascript | DSA | Greedy Problems

A Greedy Algorithm is defined as a problem-solving strategy that makes the locally optimal choice at each step of the algorithm, with the hope that this will lead to a globally optimal solution. No Backtracking: Greedy algorithms do not backtrack or revise previous decisions. …

JavaScript

7 min read

JavaScript

7 min read


Published in

Level Up Coding

·Sep 18

DSA | JavaScript | Math & Geometry

Rotate Image Spiral Matrix Set Matrix Zeroes Happy Number Pow(x, n) Multiply Strings Rotate Image You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix directly…

JavaScript

7 min read

DSA | JavaScript | Math & Geometry
DSA | JavaScript | Math & Geometry
JavaScript

7 min read


Published in

Level Up Coding

·Sep 12

Javascript Closure | Most Important to Understand

What is closure? What is it purpose? Where you may need closure? Can you implement a function that memoizes its results using closures? What are the potential issues or pitfalls with closures? How do you avoid memory leaks with closures? Example of memory leak due to closure Closure is a…

JavaScript

7 min read

JavaScript

7 min read


Published in

Level Up Coding

·Sep 7

DP | 2D | Longest Common / Palindromic SubSequence or Substring | Minimum Insertion/Deletion | Shortest Common / Distinct Subsequence | Edit Distance

Very Similar Problems: Parent Logic to Understand → Longest Common Subsequence Longest Common Subsequence(LCS) Longest Common Substring — uses LCS Longest Palindromic Subsequence — uses LCS Minimum Insertion Steps to Make a String Palindrome → uses LCS -> Length of palindrome subsequnce is inversely proportional to minimum number of deletion…

JavaScript

10 min read

JavaScript

10 min read

Sonika | @Walmart | Senior Developer | 10 Year+Exp

Sonika | @Walmart | Senior Developer | 10 Year+Exp

506 Followers

Working in Walmart as Senior IV Engineer | React | JavaScript | Data Structure

Following
  • Liu Zuo Lin

    Liu Zuo Lin

  • FardaKarimov

    FardaKarimov

  • Rajdeep singh

    Rajdeep singh

  • Fresh Frontend Links

    Fresh Frontend Links

  • Robert Maier-Silldorff

    Robert Maier-Silldorff

See all (39)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams