Skip to content

Instantly share code, notes, and snippets.

View prabuinet's full-sized avatar

Prabu Natarajan prabuinet

View GitHub Profile
Quick sort have worst-case complexity of O(N^2). The Array Size for the third testcase is 10^5.
So, it's producing an O(10^10) Complexity. In 1 second only 10^8 instructions can pass. Hence, it's giving a TLE.
Use the inbuilt Sort function in C++/Java/Python. It's optimised enough for most problems.
by Shantanu Sinha - hackerearth/codemonk/binarysearch comments
@prabuinet
prabuinet / list.md
Created December 12, 2023 18:38 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@prabuinet
prabuinet / cpp.json
Created December 17, 2023 18:42
vscode cpp snippets
{
// Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"main function with iostream": {
"prefix": "main2",
"body": [
"#include <iostream>",
@prabuinet
prabuinet / gist:9daf8ddbf6a0dbbfd945cf2e50be46f3
Last active February 18, 2025 15:20
Shoonya GetOrderMargin
public Result<string> GetOrderMargin()
{
string jsonString = $$"""
{
"uid":"{{loggedInUser.UserId}}",
"actid":"{{loggedInUser.UserId}}",
"exch":"NSE",
"tsym":"ASHOKLEY-EQ",
"qty":"1",
"prc":"0.0",