Skip to content

Instantly share code, notes, and snippets.

View offamitkumar's full-sized avatar

Amit Kumar offamitkumar

View GitHub Profile
@offamitkumar
offamitkumar / keybase.md
Created May 6, 2024 05:38
for keybase application github verification.

Keybase proof

I hereby claim:

  • I am offamitkumar on github.
  • I am offamitkumar (https://keybase.io/offamitkumar) on keybase.
  • I have a public key ASDPnnET1ApRpwWqW2h8U7P6fyxxZO-PUG08MD3gBYUqYwo

To claim this, I am signing this object:

#include <iostream>
#include <vector>
using namespace std;
void build(const vector<int>&v, vector<int>&seg, int start ,int end , int node){
if ( start == end){
seg.at(node)=v.at(start);
return;
}
int mid = (start + end) / 2;
build(v,seg,start , mid , 2*node);