Skip to content

Instantly share code, notes, and snippets.

@ms1797
ms1797 / InfixToPostfix.cpp
Last active September 11, 2022 11:43 — forked from mycodeschool/InfixToPostfix.cpp
Infix to Postfix conversion in C++ using stack. We are assuming that both operators and operands in input will be single character.
/*
Infix to postfix conversion in C++
Input Postfix expression must be in a desired format.
Operands and operator, both must be single character.
Only '+' , '-' , '*', '/' and '^' (for exponentiation) operators are expected.
*/
#include<iostream>
#include<stack>
#include<string>
@ms1797
ms1797 / 76-Minimum_Window_Substring.cpp
Created November 15, 2018 07:25 — forked from sourabh2k15/76-Minimum_Window_Substring.cpp
Leetcode 76. Minimum Window Substring
class Solution {
public:
string minWindow(string s, string t) {
unordered_map<char, int> table;
// initialize frequency table for t
for(char c : t){
table[c]++;
}