Subscribe to:
Post Comments (Atom)
remove duplicates from sorted array - two pointer approach (leetcode)
class Solution { public int removeDuplicates ( int [] nums ) { // base case: return if array have no el. if ( nums...
-
import java.util.*; // Push element at the bottom of stack class StackB { public static String reverseString(String str) { ...
-
#include <iostream> using namespace std ; // quote- break down bigger problems into smaller problems // Diamond pattern - /* pseu...
-
#include <iostream> using namespace std ; int binSearch ( int * arr, int n, int key) { int st = 0 , end = n - 1 ; w...
No comments:
Post a Comment