Skip to content

Instantly share code, notes, and snippets.

View sohamb1390's full-sized avatar

Soham Bhattacharjee sohamb1390

View GitHub Profile
@sohamb1390
sohamb1390 / AnalyticsManager.swift
Last active February 24, 2025 20:45
Complete code gist of Analytics Service and Analytics Manager
import Foundation
import UIKit
@MainActor
final class AnalyticsManager {
static let manager: AnalyticsManager = AnalyticsManager()
private var services: [any AnalyticsService] = []
private init() {}
@sohamb1390
sohamb1390 / SpiralMatrix
Created April 9, 2019 03:12
Given a 4*4 matrix. Print the Matrix in Spiral Order
func sprialForm(of matrix: inout [[Int]]) -> [Int] {
let currentIndex = 0
var pritableArray: [Int] = []
while currentIndex < matrix.count - 1 {
// ---------> Right elements
for item in matrix[currentIndex] {
pritableArray.append(item)
}
@sohamb1390
sohamb1390 / CoreDataController.swift
Created July 19, 2017 12:56 — forked from kharrison/CoreDataController.swift
Swift wrapper for NSPersistentContainer - Easy Core Data Setup with iOS 10
//
// CoreDataController.swift
//
// Created by Keith Harrison http://useyourloaf.com
// Copyright (c) 2017 Keith Harrison. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright
@sohamb1390
sohamb1390 / RadixSort.swift
Last active February 7, 2017 07:02
Radix Sort of an unsorted list of numbers
//
// RadixSort.swift
// TestAutolayout
//
// Created by Soham Bhattacharjee on 06/02/17.
//
import UIKit
class RadixSort: NSObject {