×
Home Discussions Write at Opengenus IQ
×
  • Join our Internship 🎓
  • #7daysOfCode
  • C Interview questions
  • Linux 💽
  • 🔊 Data Structures
  • Graph Algorithms
  • Dynamic Programming 💑
  • Greedy Algo 📔
  • Algo Book 🧠
  • String Algo 🧬
  • Home

array

A collection of 2 posts

Algorithms

Multiple array range increments in linear time O(N)

Given an array a containing N integers, we perform M queries. Each query has three values START, END and a value D. For each query, the problem is to increment the values from the start to end index(both inclusive) in the given array by the given value d. An efficient algorithm takes O(N+M) time

Arvind Tatiparti
Python

Create arrays in Numpy

Numpy functions that we have covered are arange(), zeros(), ones(), empty(), full(), eye(), linspace() and random(). Creating and managing arrays is one of the fundamental and commonly used task in scientific computing. Numpy is a Python library which adds support for several mathematical operations

OpenGenus Foundation OpenGenus Foundation
×

Visit our discussion forum to ask any question and join our community

View Forum
OpenGenus IQ © 2021 All rights reserved â„¢ [email: team@opengenus.org]
Top Posts LinkedIn Twitter