Skip to content

DarkRai087/Onlinejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DarkRai JavaScript Online Compiler

Welcome to the DarkRai JavaScript Online Compiler! This project is a simple yet powerful online tool designed for writing, editing, and running JavaScript code directly in your browser.

Behind the Project

As a developer, I found myself frequently switching between the console and VS Code while working on JavaScript projects. This constant back-and-forth was not only tedious but also disrupted my workflow. Additionally, existing online JavaScript compilers did not meet my needs or preferences.

Determined to streamline my development process and avoid the limitations of other tools, I decided to build my own online JavaScript compiler. This project aims to provide a clean, user-friendly environment where you can write, test, and run JavaScript code seamlessly without needing to switch between different tools or platforms.

Features

  • Code Editor: A built-in editor that allows you to write and modify JavaScript code with an intuitive and simple interface.
  • Run Code: Execute your JavaScript code and see the output directly on the page.
  • Console Output: View console.log outputs and errors in real-time in a dedicated output area.
  • GitHub Integration: Access resources or support via the GitHub button integrated into the interface.

Getting Started

To get started with the DarkRai JavaScript Online Compiler, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/yourusername/darkrai-js-compiler.git
  2. Navigate to the Project Directory:

    git clone https://github.com/yourusername/darkrai-js-compiler.git
  3. Open index.html in Your Browser: Simply open the index.html file in your preferred web browser to start using the compiler.

  4. Modify and Run Code:

  • Write your JavaScript code in the provided editor.
  • Click the Run button to execute the code.
  • View the output in the designated output area.

Technologies Used

My Skills.

Contributions

If you have suggestions for improvements or wish to contribute to the project, you can: -Open an Issue: Report bugs or request new features. -Submit a Pull Request: Contribute code or documentation enhancements. Your feedback and contributions are highly appreciated!

10 Easy-Level DSA Problems on Arrays

Problem 1: Find the Maximum and Minimum Element in an Array

C++ Java Javascript
data Data 2 Data 3
Data 4 Data 5 Data 6

Given an array of integers, find the maximum and minimum values in the array.

Problem 2: Reverse an Array

Write a function to reverse the elements in an array without using any additional array.

Problem 3: Find the "Kth" Max and Min Element in an Array

Given an array and a value K, find the Kth largest and Kth smallest element.

Problem 4: Sort an Array of 0s, 1s, and 2s

Given an array containing only 0s, 1s, and 2s, sort the array without using any sorting algorithm.

Problem 5: Move All Negative Numbers to One Side of the Array

Rearrange the elements so that all negative numbers appear on one side.

Problem 6: Union and Intersection of Two Sorted Arrays

Given two sorted arrays, find their union and intersection.

Problem 7: Rotate an Array

Rotate the array elements to the right by a given number of steps.

Problem 8: Find Duplicates in an Array

Identify any duplicate elements in an array of integers.

Problem 9: Find the Missing Number in an Array

Given an array of n consecutive integers with one number missing, find the missing number.

Problem 10: Check if Array is Sorted

Write a function to determine if the array is sorted in ascending order.

Array-Based DSA Questions

Questions

  1. Find the sum of all elements in an array.
  2. Find the largest and smallest element in an array without sorting.
  3. Check if an array contains a specific element.
  4. Count the number of even and odd numbers in an array.
  5. Find the second-largest element in an array.
  6. Calculate the frequency of elements in an array.
  7. Remove duplicates from a sorted array.
  8. Find all pairs of elements in an array that sum to a specific value.
  9. Rotate an array by one position to the left.
  10. Find the first repeating element in an array.
  11. Check if two arrays are equal or not.
  12. Find the common elements between two arrays.
  13. Merge two sorted arrays into one sorted array.
  14. Check if an array is a palindrome.
  15. Remove all occurrences of a specific element from an array.
  16. Split an array into two parts with equal sums.
  17. Find the maximum sum of a subarray of size k.
  18. Find the difference between the largest and smallest elements in an array.
  19. Replace each element in an array with the product of every other element.
  20. Find all subarrays of a given array.

  1. Implement Kadane’s algorithm to find the maximum sum of a contiguous subarray.
  2. Find the longest subarray with a sum equal to a given value.
  3. Find the majority element in an array.
  4. Rearrange an array so that even and odd numbers appear alternately.
  5. Find the longest increasing subsequence in an array.
  6. Find the smallest positive missing number in an array.
  7. Implement the "Trapping Rainwater" problem.
  8. Partition an array into two subsets such that the difference between their sums is minimal.
  9. Find the equilibrium index of an array.
  10. Implement the "Maximum Product Subarray" problem.
  11. Sort an array using the QuickSort algorithm.
  12. Find the number of subarrays with an odd sum.
  13. Rotate an array to the left by k positions.
  14. Rearrange an array to alternate positive and negative numbers.
  15. Find the "Leaders" in an array (elements greater than all elements to their right).
  16. Find the maximum circular sum of a subarray.
  17. Count the number of inversions in an array.
  18. Find the maximum difference between two elements in an array such that the larger element comes after the smaller.
  19. Find the longest contiguous subarray containing equal numbers of 0s and 1s.
  20. Implement a binary search on a rotated sorted array.

  1. Implement the "Median of Two Sorted Arrays" problem.
  2. Find the "Longest Substring Without Repeating Characters."
  3. Find the first missing positive number in an unsorted array.
  4. Implement a Merge Sort to count inversions in an array.
  5. Solve the "4Sum" problem to find quadruplets in an array that sum to a given value.
  6. Find the "Longest Palindromic Substring" in an array.
  7. Find the "Minimum Number of Platforms" required for trains at a station.
  8. Implement the "Subset Sum Problem" using recursion.
  9. Solve the "Kth Largest Element in a Stream" problem.
  10. Solve the "Count Smaller Numbers After Self" problem.
  11. Implement a Segmented Sieve to find prime numbers in a range.
  12. Solve the "Maximum XOR of Two Numbers in an Array" problem.
  13. Implement the "Largest Rectangle in Histogram" problem.
  14. Find the "Maximum Length of a Subarray With Positive Product."
  15. Solve the "Count of Range Sum" problem.
  16. Implement the "Shortest Unsorted Continuous Subarray" problem.
  17. Solve the "Split Array Largest Sum" problem.
  18. Find the "Best Time to Buy and Sell Stock with Cooldown."
  19. Solve the "Number of Subsequences That Satisfy the Given Sum Condition."
  20. Solve the "Max Chunks to Make Sorted II" problem.

Leetcode 27. Remove Element js

Easy-Level DSA Problems on Arrays

Problem 1: Find the Maximum and Minimum Element in an Array

Given an array of integers, find the maximum and minimum values in the array.

Problem 2: Reverse an Array

Write a function to reverse the elements in an array without using any additional array.

Problem 3: Find the "Kth" Max and Min Element in an Array

Given an array and a value K, find the Kth largest and Kth smallest element.

Problem 4: Sort an Array of 0s, 1s, and 2s

Given an array containing only 0s, 1s, and 2s, sort the array without using any sorting algorithm.

Problem 5: Move All Negative Numbers to One Side of the Array

Rearrange the elements so that all negative numbers appear on one side.

Problem 6: Find Duplicates in an Array

Identify any duplicate elements in an array of integers.

Problem 7: Find the Missing Number in an Array

Given an array of n consecutive integers with one number missing, find the missing number.

Problem 8: Check if Array is Sorted

Write a function to determine if the array is sorted in ascending order.

Problem 9: Rotate an Array

Rotate the array elements to the right by a given number of steps.

Problem 10: Union and Intersection of Two Sorted Arrays

Given two sorted arrays, find their union and intersection. Specify whether duplicate elements should be included in the union and intersection results.